& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)
//The string to be encrypted
$str = "This is a string";
//encrypted by sha 1
$ RES = sha 1($ str);
//Encrypt by specifying the second parameter.
$res = sha 1($str,true);
& gt