Interested in improving this site? Please check the To Do page.
crypt.SHA1
Coerces s to a string and computes a hash value using the SHA1 algorithm.
Syntax
crypt.SHA1 (s, flTranslate)
Params
- s is a string
- flTranslate is an optional boolean parameter, determining the format of the return value
Returns
The SHA1 hash value of s. If flTranslate is true (the default), the hash value is returned as a string in hexadecimal notation (40 characters), otherwise a 20-byte binary object of unknown type is returned.
Examples
crypt.SHA1 ("The quick brown fox jumps over the lazy dog")
“2fd4e1c67a2d28fced849ee1bb76e7391b93eb12”
crypt.SHA1 ("The quick brown fox jumps over the lazy cog")
“de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3”
crypt.SHA1 ("")
“da39a3ee5e6b4b0d3255bfef95601890afd80709”