md5

(PHP 4, PHP 5, PHP 7)

md5锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷 MD5 散锟斤拷值

Warning

It is not recommended to use this function to secure passwords, due to the fast nature of this hashing algorithm. See the Password Hashing FAQ for details and best practices.

说锟斤拷

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

使锟斤拷 » RSA 锟斤拷锟捷帮拷全锟斤拷司锟斤拷 MD5 锟斤拷锟斤拷锟姐法锟斤拷锟斤拷 str 锟斤拷 MD5 散锟斤拷值锟斤拷

锟斤拷锟斤拷

str

原始锟街凤拷锟斤拷锟斤拷

raw_output

锟斤拷锟斤拷锟窖★拷锟� raw_output 锟斤拷锟斤拷锟斤拷为 TRUE锟斤拷锟斤拷么 MD5 锟斤拷锟斤拷摘要锟斤拷锟斤拷16锟街节筹拷锟饺碉拷原始锟斤拷锟斤拷锟狡革拷式锟斤拷锟截★拷

锟斤拷锟斤拷值

锟斤拷 32 锟街凤拷十锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷式锟斤拷锟斤拷散锟斤拷值锟斤拷

锟斤拷锟斤拷

Example #1 md5() 锟斤拷锟斤拷

<?php
$str 
'apple';

if (
md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
    echo 
"Would you like a green or red apple?";
}
?>

锟轿硷拷

  • md5_file() - 锟斤拷锟斤拷指锟斤拷锟侥硷拷锟斤拷 MD5 散锟斤拷值
  • sha1_file() - 锟斤拷锟斤拷锟侥硷拷锟斤拷 sha1 散锟斤拷值
  • crc32() - 锟斤拷锟斤拷一锟斤拷锟街凤拷锟斤拷锟斤拷 crc32 锟斤拷锟斤拷式
  • sha1() - 锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷 sha1 散锟斤拷值
  • hash() - 锟斤拷锟缴癸拷希值 锟斤拷锟斤拷息摘要锟斤拷
  • crypt() - 锟斤拷锟斤拷锟街凤拷锟斤拷散锟斤拷
  • password_hash() - 锟斤拷锟斤拷锟斤拷锟斤拷锟缴拷校锟絟ash锟斤拷