Re: Encryption Frameworks in Cocoa
Re: Encryption Frameworks in Cocoa
- Subject: Re: Encryption Frameworks in Cocoa
- From: Jens Alfke <email@hidden>
- Date: Fri, 8 Feb 2008 07:53:08 -0800
On 7 Feb '08, at 11:44 PM, JanakiRam wrote:
I'm developing a cocoa application. I need to encrypt &
decrypt the data ( mostly NSStrings and files ). Can any one point
me to the
opensource frameworks available for this. If not provide the way to
implement it in Cocoa
I've been doing a lot of work with crypto over the past month. The
best Cocoa-level framework for this is Wade Tregaskis's open-source
Keychain.framework. If you just want to do basic symmetric encryption,
all you should need is its Key class, and the utility methods for
encrypting NSData objects in NSDataAdditions.
Alternatively, if you want to keep your code size smaller or avoid
depending on 3rd party stuff, you can use the built-in C functions in
<CommonCrypto/CommonCryptor.h>, available in 10.4+. They're lower
level but still quite easy to use.
Now, if you want to use public-key encryption, things get more
complicated, because you have to work with the Keychain for accessing
certificates and keys. But Keychain.framework does have support for
that. (It gets much more complicated if you need to generate your own
key-pairs and certs, which is what I've been dealing with; if you need
to do that, we should probably take this thread to the Apple cdsa-
discuss mailing list instead.)
--Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden