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


History

VersionStatusNotes
10.0NewNew in this version.