(NSString *)_bCryptPassword:(NSString* )password withSaltData:(NSData *)saltData {
char keybuf[61];
char settingbuf[30];
const char *genkey, *setting;
const char *cPassword = [password cStringUsingEncoding:NSUTF8StringEncoding];
setting = _crypt_gensalt_blowfish_rn(“$2b$“, 14, [saltData bytes], 20, settingbuf, sizeof(settingbuf));
if (!setting)
return @“”;
genkey = _crypt_blowfish_rn(cPassword, setting, keybuf, sizeof(keybuf));
if (!genkey)
return @“”;
return [NSString stringWithCString:keybuf encoding:NSUTF8StringEncoding];
}