Reputation: 41
Now I want to encrypt or decrypt some data in object-c use DES algorithm ,can somebody give me some suggestion?
Upvotes: 0
Views: 3632
Reputation: 196
A code sample can be found in How to encrypt an NSString in Objective C with DES in ECB-Mode?
As the referring topic describes, you will have to keep in mind that DES uses a 56-bit (7 bytes) key and 64-bit (8 bytes) blocks.
Although DES is symmetric you will have to decrypt data by providing the kCCDecrypt option to the CCCrypt function.
Upvotes: 1
Reputation: 134
First point. AES has replaced DES as the de-facto encrpytion standard, at least for the banking industry.
Second Point: Irrespective of what algo you decide on, this is what you have to do.
Hope this helps. Let me know if you need any particular information.
Upvotes: 1