sha256(
DATA
)

The sha256( function calculates the SHA-256 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-256 hash of a binary or text data item. SHA-256 produces a 256-bit (32-byte) hash value. A SHA-256 hash value is typically rendered as a hexadecimal number, 64 digits long. Here’s an example showing how the SHA-256 hash of a file can be calculated:

sha256(fileload("~/Library/Application Support/AddressBook/AddressBook-v22.abcddb"))
    ☞ e7049efd4df8e3337a43dac59f03d26bea2898b227608e890ce5441af1dbfcec

For more information about SHA-2 in general (SHA-256 is part of the SHA-2 family), see SHA2.


See Also


History

VersionStatusNotes
10.0NewNew in this version.