module Digests:Netsys_crypto_types.DIGESTS
Cryptographic digests
Cryptographic digests.
Users should not call functions of the provider directly, but use
Netsys_digests
, or another higher-level layer.
type
digest
Describes a digest
val digests : digest list
returns digests
val find : string -> digest
Returns the digest of this name, or raises Not_found
val name : digest -> string
returns the name of the digest. The name follows the format
<uppercasename>-<size>
, e.g. "MD5-128", "SHA1-160", "SHA2-256".
val size : digest -> int
returns the size of the hash output (in bytes)
val block_length : digest -> int
the block length (in bytes)
type
digest_ctx
A digest context stores state while digesting data
val create : digest -> digest_ctx
Creates a fresh context
val add : digest_ctx -> Netsys_types.memory -> unit
Adds data
val finish : digest_ctx -> string
Returns the digest