Interested in improving this site? Please check the To Do page.

Back to Crypt Verbs

crypt.cramSHA1

Computes a challenge-response authentication mechanism (CRAM) response using SHA1.

Syntax

crypt.cramSHA1 (username, password, challenge)

Params

  • username, a string.
  • password, a string.
  • challenge, a string.

Returns

A string that can used as a response to a challenge-response protocol.

Examples

crypt.cramSHA1 ("tim", "tanstaaftanstaaf", 
   base64.decode ("PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+"))

“tim b913a602c7eda7a495b4e6e7334d3890”

Notes

As defined in Wikipedia, The SHA (Secure Hash Algorithm) family is a set of related cryptographic hash functions. The most commonly used function in the family, SHA-1, is employed in a large variety of popular security applications and protocols, including TLS, SSL, PGP, SSH, S/MIME, and IPSec. SHA-1 is considered to be the successor to MD5, an earlier, widely-used hash function. The SHA algorithms were designed by the National Security Agency (NSA) and published as a US government standard.


Personal Tools