DataHash
DATAHASH - Checksum for Matlab array, struct, cell or file
Hash = DataHash(Data, Opt)
Data: Array of built-in types (U)INT8/16/32/64, SINGLE, DOUBLE (real or complex)
CHAR, LOGICAL, CELL, STRUCT (scalar or array, nested), function_handle.
Opt: Options struct:
Opt.Method: 'SHA-1', 'SHA-256', 'SHA-384', 'SHA-512', 'MD2', 'MD5'.
Opt.Format: 'hex', 'HEX', 'double', 'uint8', 'base64'.
Opt.Input:
'file': Data is a file name.
'bin': Only the contents of Data is considered.
Data must be numerical of a CHAR.
'array': Default, contents and type of Data are considered.
Nested CELLs and STRUCTs possible.
Hash: String or numeric vector.
EXAMPLES:
Default: MD5, hex:
DataHash([]) % 7de5637fd21