NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_sha1(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_sha1 - Returns a 40-character, hex-encoded string containing the SHA1 hash of the first argument

Table Of Contents

Synopsis

Description

A cryptographic hash (sometimes called digest) is a kind of signature for a text or a data file. SHA1 generates an almost-unique 160-bit signature for a text.

COMMANDS

ns_sha1 ?-binary? ?--? string

Compute an SHA1 checksum from the provided string. When the option -binary is used, the Tcl byte array value of the provided input argument is used and no UTF-8 interpretation is performed.

   nscp 2> ns_sha1 test   
   A94A8FE5CCB19BA61C4C0873D391E987982FBBD3

See Also

ns_base64, ns_crypt, ns_hmac, ns_md, ns_md5, ns_rand, nsd

Keywords

crypto, encoding, global built-in