AESCrypt-ObjC icon indicating copy to clipboard operation
AESCrypt-ObjC copied to clipboard

Encrypt and decrypt directly to NSData

Open unixmonkey opened this issue 10 years ago • 0 comments

Hey, thanks for this project. It came in handy for me today.

I'm using it to encrypt/decrypt some binary data, rather than strings, so these extensions are exactly what I needed. I figure they may help others, too.

Usage:

NSData *plainData = [NSData dataWithContentsOfFile:someBinaryFile];
NSString *password = @"p4ssw0rd";
NSData *encryptedData = [AESCrypt encryptData:plainData password:password];
NSData *decryptedData = [AESCrypt decryptData:encryptedData password:password];

If there's anything I can do to make this better, please let me know!

unixmonkey avatar Apr 06 '14 04:04 unixmonkey