Current location - Quotes Website - Personality signature - Ask God to translate the following Java code into php?
Ask God to translate the following Java code into php?
This algorithm is built in java and php, so it can be used directly-whether the result is the same or not depends on the result of the algorithm.

& 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