【加密函数分享】PHP函数hash_file ()分享(2021-5-11)
发布于 2021-05-12 23:20 ,所属分类:区块连和PHP开发学习资料

每日分享PHP知识点,大家都赞同是一种动力,分享是一种美德,再说了分享一下又不会怀孕?只要你开心就好......
hash_file ()使用给定文件的内容生成哈希值
string hash_file ( string $algo , string $filename [, bool $raw_output = false ] )
比较两个字符串,无论它们是否相等,本函数的时间消耗是恒定的。
本函数可以用在需要防止时序攻击的字符串比较场景中, 例如,可以用在比较 crypt() 密码哈希值的场景。
参数
algo
filename
raw_output
<?php
/* 创建一个要计算哈希值的文件 */
file_put_contents('example.txt', 'The quick brown fox jumped over the lazy dog.');
echo hash_file('md5', 'example.txt');
?>
5c6ffbdd40d9556b73a21e63c3e0e904



















![[Python] 11个具体的实际开发案例Python近期视频资料 如http服务器 QQ空间自动登录第三方函数](https://static.kouhao8.com/sucaidashi/xkbb/0ceab0a2df5e4d63fda958d69ac7f181.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)











![[项目实战] PHP功能经典案例日历/九九乘法表/递归函数万年历/验证码/缩略图等](https://static.kouhao8.com/sucaidashi/xkbb/cd40585dc6146bf1848cbd115437f6ae.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)


相关资源