md5(
md5(
DATA
)

The md5( function calculates the MD5 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 MD5 hash of a binary or text data item. For example, a MD5 hash can be used provide some assurance that a transferred file has arrived intact. For example, file servers often provide a pre-computed MD5 (known as Md5sum) checksum for the files, so that a user can compare the checksum of the downloaded file to it. Here’s an example showing how the MD5 hash of a file can be calculated:

    md5(fileload("~/Library/Application Support/AddressBook/AddressBook-v22.abcddb"))
        ☞ 27f7121af6bc16f1ff38cb29ac48fc6f

For more information about MD5 in general, see MD5.

See Also

- decrypt( -- decrypts data.
- encrypt( -- encrypts data.
- sha1( -- calculates the SHA-1 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.