Difference between revisions of "$sha1"
From Scriptwiki
m (add other hashes.) |
|||
Line 1: | Line 1: | ||
Returns SHA-1 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename. | Returns SHA-1 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename. | ||
$sha1(text|&binvar|filename,[N]) | $sha1(text|&binvar|filename,[N]) | ||
+ | |||
+ | Also available are $sha256, $sha384 and $sha512 with the same format for SHA-256, SHA-384 and SHA-512. | ||
+ | $sha256(text|&binvar|filename,[N]) | ||
== Example == | == Example == | ||
Line 12: | Line 15: | ||
$sha1(mirc.ini,2) | $sha1(mirc.ini,2) | ||
Returns the SHA-1 hash value of the file ''mirc.ini''. | Returns the SHA-1 hash value of the file ''mirc.ini''. | ||
+ | |||
+ | $sha256(text string) | ||
+ | Returns the SHA-256 hash value of ''text string'' (f8ddf8b97330b28452da0971b6b78c19fd769378bd26d29d7bf790fbba051710) | ||
== See Also == | == See Also == |
Revision as of 14:06, 18 July 2015
Returns SHA-1 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename.
$sha1(text|&binvar|filename,[N])
Also available are $sha256, $sha384 and $sha512 with the same format for SHA-256, SHA-384 and SHA-512.
$sha256(text|&binvar|filename,[N])
Example
$sha1(text string)
Returns the SHA-1 hash value of text string (384270d144eede06a0254452cc26d06f2b0005d6)
//bset -t &bvar 1 text string | echo -ag $sha1(&bvar,1)
Echoes the same as the last value, this time using a binary variable.
$sha1(mirc.ini,2)
Returns the SHA-1 hash value of the file mirc.ini.
$sha256(text string)
Returns the SHA-256 hash value of text string (f8ddf8b97330b28452da0971b6b78c19fd769378bd26d29d7bf790fbba051710)