sha

Syntax

%sha(string)

Description

Returns hex-encoded text which was "scrambled" with the Secure Hash Algorithm 1. The %sha function is a standard, secure algorithm for "scrambling" text so that anyone who knows the original can perform verification without transmiting the original. This algorithm is portable and available in any language and environment.

Rather than storing passwords in a database, store the %sha() hashed username and password as a unique "id". Then, when a person logs in you check to see if their "id" is in the database. This way you can run an anonymous, secure database, where nobody, not even the DBA, can get access to a users password!

Example

%sha(hello)
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

is shorthand for

%digest(sha1,hello)
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

See Also

sha256 | md5 | digest