NSData+AES.h 545 B

12345678910111213141516
  1. /**
  2. http://mythosil.hatenablog.com/entry/20111017/1318873155
  3. http://blog.dealforest.net/2012/03/ios-android-per-aes-crypt-connection/
  4. */
  5. #import <Foundation/Foundation.h>
  6. @interface NSData (AES)
  7. - (NSData *)AES128EncryptedDataWithKey:(NSString *)key;
  8. - (NSData *)AES128DecryptedDataWithKey:(NSString *)key;
  9. - (NSData *)AES128EncryptedDataWithKey:(NSString *)key iv:(NSString *)iv;
  10. - (NSData *)AES128DecryptedDataWithKey:(NSString *)key iv:(NSString *)iv;
  11. - (NSString*)hexUppercaseString;
  12. - (id)initWithHexString:(NSString*)hexString;
  13. @end