收藏
回答

关于小程序 openssl_decrypt 经常返回空串?

$iv = base64_decode('yW0faqjnM37PKNBQWn1hsA==');

$encryptedDat = base64_decode('4R14ZT01gvvpLz7JcN21PeD9NyDqCRzxMzXyjf92NcYJjKk10PlK7mmncyDD2Pd4+72C5pZMQwN0LxUmGBae+9F3KFXFMW47RdFuw3MF8kysD36K6tcGo2d9ETFRzaIIieFXafMgHgp+1nfCi49SiugoGMvxVqx5wzbcTm5WS9j4nZfIXCJMJRHgfqTeeGafMteNWWrMNBZ/SOcIDU1tI+gSaf19cLfTFIvTdaKLCOt8nzDQMmxsSMhw7RW3rw4pgNQv3Gz+XCw/JoBXomnZY4FSkaPH6PGm5tJjOY2rPh7cAxk29yUzSixLrgDmzUPym7hyEt5OiIU6//AMH55FTqWJh1q8MwbV10N7WPAg9dH9i/nnzwiXXm7kwk1agXH4X8mz35JO1whwpdzZybuUh5LNtvdPUs07To4FyxsySx85lhnwp107aAf9pmwbRMiL92EQXzd3qHRuHzuvQn43gQ==');

$aesKey = base64_decode('yW0faqjnM37PKNBQWn1hsA==');

$data = openssl_decrypt($encryptedDat , "AES-128-CBC", $aesKey, 1, $iv);

print_r($data);

------------------------------------------

经常返回空串,对比了iv,$encryptedDat 没错。。

什么问题呢?????

回答关注问题邀请回答
收藏
登录 后发表内容