我使用下面的PHP代码来加密密码,然后将其保存到数据库中,我需要能够使用Python解密它。在
我成功地用PHP解密它,但无法找到 使用Python(如果重要的话,我使用的是2.7.9版)。。在
$mypass = "somepassword"
$encryptionMethod = "AES-256-CBC";
$secretHash = "25c6c78835b7479b151f2136cd888777";
$encpass = openssl_encrypt($mypass, $encryptionMethod, $secretHash);
我没有问题打开和读取数据库,我唯一的问题是解密部分。 欢迎提出任何建议,谢谢。在
终于找到了解决办法。。。下面的代码似乎是有效的,我相信有一个更有效的方法来做到这一点,但现在它正在做我需要它做的事情。。。希望这能在将来帮助别人。请记住,这不是保护数据的安全方法!在
相关问题 更多 >
编程相关推荐