Previous Up Next

5.7  Module Digest

MD5 message digest.

This module provides functions to compute 128-bit ``digests'' of arbitrary-length strings or files. The digests are of cryptographic quality: it is very hard, given a digest, to forge a string having that digest. The algorithm used is MD5.

type (#'a:level) t = 'a string
The type of digests: 16-character strings.

val string : 'a string -> 'a t
Return the digest of the given string.

val to_hex : 'a t -> 'a string
Return the printable hexadecimal representation of the given digest.



Previous Up Next