(PHP 4, PHP 5, PHP 7, PHP 8)
md5 — Calcola il valore md5 di una stringa
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.
Calcola il valore MD5 di str
utilizzando il
» RSA Data Security, Inc.
MD5 Message-Digest Algorithm, e restituisce tale valore.
str
La stringa.
raw_output
Se il parametro opzionale raw_output
è impostato a true
,
allora viene restituito l'md5 digest in formato binario raw con una
dimensione di 16.
Restituisce il valore come un numero esadecimale di 32 caratteri.
Example #1 Un esempio di md5()
<?php
$str = 'apple';
if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
echo "Would you like a green or red apple?";
}
?>