AESCrypt in iOS

The most simple AES library in iOS is AESCrypt-ObjC, I thought.
This is simple implementation of AES crypt and decrypt. Certainly, this is not enough if you want to use with great understanding(no iv concept), but for simple use it is enough.

How to integrate

Copy source files into your project. Smile

Main

  • AESCrypt.h
  • AESCrypt.m

Category

  • NSData+Base64.h
  • NSData+Base64.m
  • NSData+CommonCrypto.h
  • NSData+CommonCrypto.m
  • NSString+Base64.h
  • NSString+Base64.m

Sample

NSString *message = @"top secret message";
NSString *password = @"p4ssw0rd";    
NSString *encryptedData = [AESCrypt encrypt:message password:password];
NSLog(@"Encrypted %@", encryptedData);
NSString *decrypted = [AESCrypt decrypt:encryptedData password:password];
NSLog(@"Decrypted %@", decrypted);

Use is very easy isn’t it!
But no customize, fix key size and no iv management.