PHP - sha1 函数



语法

string sha1 ( string $str [, bool $raw_output = false ] )

定义和用法

它用于计算字符串的 sha1 哈希值

返回值

它返回字符串的 sha1 哈希值

参数

序号 参数和描述
1

filename

它包含要哈希的文件的文件名信息

2

raw_output

它是一个布尔值,指示输出

示例

试用以下示例

<?php
   $input = "tutorialspoint";
   echo sha1($input);
?>

这将产生以下结果:

43aeef3e6b34a52281c6f7ce49f43a94e009dda5
php_function_reference.htm
广告

© . All rights reserved.