User Tools

Site Tools


uphp:functions:sha1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:functions:sha1 [2017/05/16 06:14]
admin created
uphp:functions:sha1 [2021/09/13 05:57]
Line 1: Line 1:
-====== sha1($str) ====== 
-Calculate the sha1 hash of a string.  This can be used for cryptography or just for checksum calculations. 
  
-For more information on SHA1, see the [[https://en.wikipedia.org/wiki/SHA-1|Wikipedia link]]. 
- 
-Example: 
- 
-<code php> 
-<pre> 
-<?  
-// call the function with this: sha1.cgi?key=secretkey 
- 
-// sha1 hash value for secretykey 
-$hash = "9885F8AF04289135DF259E34BD22D17FE45EA81E"; 
- 
-if (sha1($_GET['key']) == $hash) { 
-        print("hashes match!"); 
-} 
- 
-?> 
-</pre> 
- 
-</code> 
uphp/functions/sha1.txt · Last modified: 2021/09/13 05:57 (external edit)