I hereby claim:
- I am marsepu on github.
- I am marsepu (https://keybase.io/marsepu) on keybase.
- I have a public key ASBoG0CMBR1zn4RmoEl2kFq6x0OTABsqrF7aAm-iTs8n-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#import <CommonCrypto/CommonKeyDerivation.h> | |
#import <CommonCrypto/CommonCryptor.h> | |
- (NSData *)derivedKeyFromPassword:(NSString*)password salt:(NSData*)saltData length:(NSUInteger)keyLength | |
{ | |
NSMutableData *derivedKey = [NSMutableData dataWithLength:keyLength]; | |
int result = CCKeyDerivationPBKDF(kCCPBKDF2, // algorithm | |
password.UTF8String, // password | |
password.length, // passwordLength | |
saltData.bytes, // salt |
#import <CommonCrypto/CommonCryptor.h> | |
#warning ADD Security.framework to your project | |
+ (NSData *)tripleDesEncryptData:(NSData *)inputData | |
key:(NSData *)keyData | |
error:(NSError **)error | |
{ | |
NSParameterAssert(inputData); | |
NSParameterAssert(keyData); |