views:

1012

answers:

3

What's a good encryption algorithm that will allow me to specify a password to encrypt text?

I'm assuming the standard algorithms out there will work cross-platform but I do need the algorithm to work in C# and Objective-C - is anyone familiar with any samples for Objective-C?

Thanks

A: 

AES is probably your best bet. If I'm not mistaken you could use any C library with Objective-C... so I'm sure you could find an open source AES implementation.

bobwienholt
A: 

Look at System.Security.Cryptography Namespace. Some algorithms are implemented in BCL but I think the majority are just wrappers around cryptography services in Windows OS.

Try this article on CodeProject.

Petar Repac
+1  A: 

On OS X, if the "encrypted text" you want to store is a password, you should just store it in the Keychain. It will do all of the necessary crypto for you.

Chris Hanson