s = CS.Hash.createMd5(path := ... ‖ text := ... ‖ bytes := ...ʃ, bytesFormat := ...ʅ)
Argument | Description | Types / Required |
path | The path of a file to hash. | string
not required |
text | A text string to hash. | string
not required |
bytes | Bytes to hash. | string
not required |
bytesFormat | The format of the bytes (if specifying bytes).
The default value is "autodetect". | string
not required |
The
Hash.createMd5 action creates a
MD5 hash based on the contents of a file, text, or bytes. One, and only one, of the arguments
path,
text, or
bytes must be provided. If specifying
text, the
UTF-8 representation of the text is hashed. If specifying
bytes, the optional
bytesFormat argument dictates how
binary data is converted from string format.
It is also possible to create MD5 hashes using the action
Hash.createHash and specifying
"MD5" as the
type.
The action returns a MD5 hash represented as a hexadecimal string. The 32-character hexadecimal characters are returned in lowercase.
The action throws an exception if any of its arguments are not specified in a valid form, if the file does not exist, or if the bytes value cannot be successfully converted from its binary format.