The sha1() function calculate the sha1 hash of a string
sha1 ( string $string ,raw_output=FALSE) : string
| Parameter Name | Descrption | 
|---|---|
| $string | Required, The string. | 
| raw_output | Optional, Specifies the raw_output for hexadecimal number or binary format 
 | 
When TRUE - Raw 20 bit character format, When FALSE- 40 character hexadecimal number
echo sha1('test');
//Output :: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
if(sha1('test')=='a94a8fe5ccb19ba61c4c0873d391e987982fbbd3')
 echo 1;
else
 echo 0;
Related Functions