Reputation: 264
I am using this encyption function in my php code:
function _encrypt($key,$string){
$string = ' '.$string.' ';
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key)
, $string, MCRYPT_MODE_CBC, md5(md5($key))));
}
function _decrypt($key,$encrypted){
return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key),
base64_decode($encrypted),
MCRYPT_MODE_CBC, md5(md5($key))), "\0");
}
I would like to know the iOS equivalent functions that might support this on the iPhone's side to negotiate with the server.
Thanks!
Upvotes: 1
Views: 850
Reputation: 1753
I don't know if it's still relevant but I created a git project which enables you to send an NSDictionary, encrypted or unencrypted from iOS to PHP
Check it out: Github: JNKTransmitter
Upvotes: 1