PHP - md5 函式



語法

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

定義和用法

用於計算字串的 md5 雜湊值。

返回值

返回一個 32 個字元的十六進位制雜湊值。

引數

序號 引數及描述
1

str

包含字串資訊。

2

raw_output

如果為 TRUE,則返回長度為 16 的原始二進位制格式摘要。

示例

嘗試以下示例

<?php
   $str = "tutorialspoint";
   
   echo md5($str);
?>

這將產生以下結果:

6c60b3cfe5124f982eb629e00a98f01f
php_function_reference.htm
廣告