简体   繁体   English

相同的算法,相同的字符串,相同的盐,不同的结果?

[英]Same algorithm, same string, same salt, different result?

I'm using the Blowfish algorithm for encrypting passwords in my application. 我正在使用Blowfish算法对应用程序中的密码进行加密。

After reinstalling Ubuntu on the server, the output of this algorithm has changed - though I'm trying the same string and the same salt. 在服务器上重新安装Ubuntu之后,此算法的输出已更改-尽管我尝试使用相同的字符串和相同的盐。

Any ideas on why this happens or how to solve it? 关于为什么会发生或如何解决的任何想法? Thanks in advance. 提前致谢。

I'm using the native PHP crypt implementation on an Ubuntu Server (11.04). 我正在Ubuntu服务器(11.04)上使用本机PHP crypt实现。 Before I had the version 10.10. 在我拥有10.10版本之前。

Maybe you change the encoding type. 也许您更改编码类型。 Make sure that you are using the same encodind type for the both encrypt operation. 确保两个加密操作都使用相同的encodind类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM