TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
NSUserDefaults-AESEncryptor is a NSUserDefaults category. Its purpose to encrypt/decrypt keys and values with AES encryptor.
NSUserDefaults-AESEncryptor works on iOS 5.0+ version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
You will need LLVM 3.0 or later in order to build NSUserDefaults-AESEncryptor.
NSUserDefaults-AESEncryptor uses CocoaSecurity to encrypt/decrypt.
Alternatively you can directly add source files to your project.
NSUserDefaults+AESEncryptor.h
and add this to Prefix.pch
// Set a key. (If no key is set, a default key will be used)
[[NSUserDefaults standardUserDefaults] setAESKey:@"World Cup 2014"];
// Encrypt
[[NSUserDefaults standardUserDefaults] encryptValue:@"Brazil" withKey:@"country"];
// Decrypt
NSString value = [[NSUserDefaults standardUserDefaults] decryptedValueForKey:@"country"];
// Remove object
[[NSUserDefaults standardUserDefaults] removeObjectForAESKey:@"country"];
This code is distributed under the terms and conditions of the MIT license.
A brief summary of each NSUserDefaults-AESEncryptor release can be found on the wiki.