module Netsys_digests:sig..end
Cryptographic digests (hashes)
typeiana_hash_fn =[ `MD2 | `MD5 | `SHA_1 | `SHA_224 | `SHA_256 | `SHA_384 | `SHA_512 ]
The hash functions contained in the IANA registry (http://www.iana.org/assignments/hash-function-text-names/hash-function-text-names.xhtml).
class type digest_ctx =object..end
class type digest =object..end
The following functions use the current digest module (as retrieved by
Netsys_crypto.current_digests), unless the impl argument is
passed.
val digests : ?impl:(module Netsys_crypto_types.DIGESTS) ->
unit -> digest listList of supported digests
val find : ?impl:(module Netsys_crypto_types.DIGESTS) -> string -> digestfind name: get the digest name.
The name conventionally follows the <uppercasestring>-<size> format,
e.g. "MD5-128", "SHA1-160", or "SHA2-256".
val digest_tstring : digest -> Netsys_types.tstring -> stringDigest a string
val digest_bytes : digest -> Stdlib.Bytes.t -> stringDigest a string
val digest_string : digest -> string -> stringDigest a string
val digest_mstrings : digest -> Netsys_types.mstring list -> stringDigest a sequence of mstrings
val hmac : digest -> string -> digesthmac dg key: returns the digest context computing the HMAC
construction (RFC-2104).
The key must not be longer than dg#block_length.
val iana_find : ?impl:(module Netsys_crypto_types.DIGESTS) ->
iana_hash_fn -> digestiana_find name: get the digest name
val iana_alist : (string * iana_hash_fn) listmaps the IANA name to the hash function id
val iana_rev_alist : (iana_hash_fn * string) listthe reverse
val oid_alist : (int array * iana_hash_fn) listmaps the OID to the hash function id
val oid_rev_alist : (iana_hash_fn * int array) listthe reverse
val name_alist : (string * iana_hash_fn) listmaps the OCamlnet name to the hash function id
val name_rev_alist : (iana_hash_fn * string) listthe reverse