为什么无论字符串有多少,为什么加密出来的东西都是一样长的??
解决方案 »
- 请大家帮忙看看问题
- 这段函数是什么意思啊? 能不能标注的清楚点啊 谢谢
- 一个mysql数据的问题
- MYSQL里有没有像PHP里面的explode函数
- 怎么让鼠标停在一个有背景图片的td上时,鼠标指针变手形?
- 请问在表单提交后,自动跳转到其他页面???
- require问题,请赐教!
- 在php中dl()可以使用.dll文件。但是怎么取出其中的数据啊。
- mysql_connect() in D:\PHP\Web\test.php on line 6的问题
- (sql server 数据库连接问题)求大帮忙看一下哪里错了,小弟纠结了好久了
- 二维数组在不同页面传递
- 在cakephp中如果使用mysql_affected_rows();得到影响select语句的行数
<?php
$a = "mmmmmmmmmmmmmmmmmmmmsadfkhafjkadshfsdjfiosadkfnskdljfsiljflksdjfkldsjfiojcn";
echo sha1($a)."<hr>".sha1($a);
?>无论$a是什么字符串,得到的答案都是一样的长度。
string sha1 ( string $str [, bool $raw_output = false ] )Calculates the sha1 hash of str using the » US Secure Hash Algorithm 1.
Report a bug
Parametersstr The input string.
raw_output If the optional raw_output is set to TRUE, then the sha1 digest is instead returned in raw binary format with a length of 20, otherwise the returned value is a 40-character hexadecimal number.==============
这个函数的输出本来就是固定长度