what is the syntax of the function in php?
sha1(string,raw)
Parameter | Description |
---|---|
string | Required. The string to be calculated |
raw | Optional. Specify hex or binary output format:TRUE – Raw 20 character binary formatFALSE – Default. 40 character hex number |
examples of the SHA1() function
Example 1. In this example, we calculate the SHA-1 hash of the string “Hello”.
<?php
$str = "Hello";
echo sha1($str);
?>