This shows you the differences between two versions of the page.
uphp:functions:sha1 [2019/08/16 09:42] admin [See Also] |
uphp:functions:sha1 [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======sha1====== | ||
- | < | ||
- | |||
- | Calculate the SHA1 hash of a < | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | This can be used for cryptography or just for checksum calculations. | ||
- | |||
- | For more information on SHA1, see this [[https:// | ||
- | |||
- | ====Parameter==== | ||
- | |||
- | < | ||
- | |||
- | ====Return Values==== | ||
- | |||
- | < | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | <? | ||
- | // Name this example and call it with this: sha1.cgi? | ||
- | |||
- | // SHA1 hash value for " | ||
- | $hash=" | ||
- | |||
- | if (sha1($_GET[' | ||
- | print(" | ||
- | } | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[md5()]] - Calculate the MD5 hash of a < | ||
- | |||
- | [[md5_file()]] - Calculate the MD5 hash of a file | ||
- | |||
- | [[hash_hmac()]] - Calculate the hash of a string | ||
- | |||
- | [[aes_decrypt()]] - Decrypt a string using the AES algorithm | ||
- | |||
- | [[aes_encrypt()]] - Encrypt a string using the AES algorithm |