我想在 iOS 中加密密码。
NSData *dataIn = [@"Now is the time for all good computers to come to the aid of their masters." dataUsingEncoding:NSASCIIStringEncoding];
NSMutableData *macOut = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH];
CC_SHA256(dataIn.bytes, dataIn.length, macOut.mutableBytes);
NSLog(@"dataIn: %@", dataIn);
NSLog(@"macOut: %@", macOut);
我想用指定的键创建。有没有办法做到这一点。
谢谢。