Digest.MD5
MD5
is the MD5 hash function. It produces 128-bit (16-byte) digests and is not cryptographically secure at all. It should be used only for compatibility with earlier designs that mandate the use of MD5.
Compare two digests, with the same specification as Stdlib.compare
.
let string: string => t;
Return the digest of the given string.
let bytes: bytes => t;
Return the digest of the given byte sequence.
let substring: string => int => int => t;
substring s ofs len
returns the digest of the substring of s
starting at index ofs
and containing len
characters.
let subbytes: bytes => int => int => t;
subbytes s ofs len
returns the digest of the subsequence of s
starting at index ofs
and containing len
bytes.
let channel: in_channel => int => t;
Read characters from the channel and return their digest. See Digest.channel
for the full specification.
let file: string => t;
Return the digest of the file whose name is given.
let output: out_channel => t => unit;
Write a digest on the given output channel.
let input: in_channel => t;
Read a digest from the given input channel.
let to_hex: t => string;
Return the printable hexadecimal representation of the given digest.
let of_hex: string => t;
Convert a hexadecimal representation back into the corresponding digest.