AES256 String encryption on PHP and decryption on iPhone

前端 未结 1 885
耶瑟儿~
耶瑟儿~ 2021-01-22 10:47

i have this on my php code:

$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = \"bla\";         


        
相关标签:
1条回答
  • 2021-01-22 11:19

    I bet, you're stumbling upon a padding issue. I addressed this topic in three SO answers, so you likely find the solution in one of those answers:

    • Difference in PHP encryption from iOS and .NET

    • AES Encrypt in C#, decrypt in PHP

    • DES Encryption in PHP and C#

    0 讨论(0)
提交回复
热议问题