sha1(
sha1(
DATA
)

The sha1( function calculates the SHA–1 hash of a binary or text data item.

Parameters

This function has one parameter:

data – The data to be hashed.

Description

This function calculates the SHA–1 hash of a binary or text data item. SHA–1 produces a 160-bit (20-byte) hash value. A SHA–1 hash value is typically rendered as a hexadecimal number, 40 digits long. Here’s an example showing how the SHA–1 hash of a file can be calculated:

    sha1(fileload("~/Library/Application Support/AddressBook/AddressBook-v22.abcddb"))
        ☞ 6706b26566628b78b0911f8c6cc5ae83ce661c99

For more information about SHA–1 in general, see SHA–1.

See Also

- decrypt( -- decrypts data.
- encrypt( -- encrypts data.
- md5( -- calculates the MD5 hash of a binary or text data item.
- sha256( -- calculates the SHA-256 hash of a binary or text data item.
- sha512( -- calculates the SHA-512 hash of a binary or text data item.

History

Version | Status | Notes
10.0 | New | New in this version.