Difference between revisions of "Nssha1"
Jump to navigation
Jump to search
(formatted with pre) |
(Added salted example.) |
||
| Line 9: | Line 9: | ||
# 04003622EB9D0F788CE7568C7EED23809534365A | # 04003622EB9D0F788CE7568C7EED23809534365A | ||
</pre> | </pre> | ||
| + | |||
| + | Usually this function is used with a salt, as without a salt it is succeptible to dictionary-based attacks. | ||
| + | |||
| + | <pre> | ||
| + | set sSalt "salty" | ||
| + | set sRawPassword "mypassword" | ||
| + | set sPassword [ns_sha1 ${sRawPassword}${sSalt}] | ||
| + | # B48FB74597C11FC609DBE912992085EB07847FB6 | ||
| + | </pre> | ||
| + | |||
| + | Debian users can install this module for aolserver4 with: | ||
| + | <pre>apt-get install aolserver4-nssha1</pre> | ||
Revision as of 22:19, 2 December 2005
The nssha1 module provides the ns_sha1 function:
Example:
set sRawPassword "mypassword" set sPassword [ns_sha1 $sRawPassword] ns_adp_puts $sPassword # 04003622EB9D0F788CE7568C7EED23809534365A
Usually this function is used with a salt, as without a salt it is succeptible to dictionary-based attacks.
set sSalt "salty"
set sRawPassword "mypassword"
set sPassword [ns_sha1 ${sRawPassword}${sSalt}]
# B48FB74597C11FC609DBE912992085EB07847FB6
Debian users can install this module for aolserver4 with:
apt-get install aolserver4-nssha1