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
廣告