1

Possible Duplicate:
AES Encryption for an NSString on the iPhone

What is the best way to encrypt or decrypt NSString using a custom key?

Is there any good library for that ?

Community
  • 1
  • 1
refaelos
  • 7,927
  • 7
  • 36
  • 55
  • Describe your use case please. There are many forms of encryption, and many of them are only applicable under certain conditions. – Maarten Bodewes Oct 08 '12 at 16:33
  • The use case is that i'm trying to encrypt NSString and save it in a database. In the future i'll want to decrypt it. – refaelos Oct 08 '12 at 16:35

1 Answers1

3

Take a look at this question:

AES Encryption for an NSString on the iPhone

And take a look at this library:

https://github.com/dev5tec/FBEncryptor

However, one note on this library: It uses some bad practices. So, if security is important for you I would recommend read up a little bit more regarding that and choose another code which does encryption (or write it on your own).

Community
  • 1
  • 1
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
  • Good answer. I also use this one: http://stackoverflow.com/questions/1417893/encrypted-nsdata-to-nsstring-in-obj-c – refaelos Oct 08 '12 at 17:45