PHP的sha1()和MySQL的SHA()是否会给出相同的结果? [英] Will PHP's sha1() and MySQL's SHA() give the same result?
本文介绍了PHP的sha1()和MySQL的SHA()是否会给出相同的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果不使用盐,它们会一样吗?
If no salt is used, will they be the same?
推荐答案
是. sha1算法始终为相同的输入产生相同的值;这就是哈希算法的重点.默认情况下,它们都还返回一个40个字符的小写十六进制转储.
Yes. The sha1 algorithm always produces the same value for the same input; that's the whole point of a hashing algorithm. They also both return a 40-character lowercase hex dump by default.
这篇关于PHP的sha1()和MySQL的SHA()是否会给出相同的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文