Plasma GitLab Archive
Projects Blog Knowledge

Module Netsys_digests

module Netsys_digests: sig .. end
Cryptographic digests (hashes)

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 list
List of supported digests
val find : ?impl:(module Netsys_crypto_types.DIGESTS) -> string -> digest
find name: get the digest name.

The name conventionally follows the <uppercasestring>-<size> format, e.g. "MD5-128", "SHA1-160", or "SHA2-256".

val digest_string : digest -> string -> string
Digest a string
val digest_mstrings : digest -> Netsys_types.mstring list -> string
Digest a sequence of mstrings
val hmac : digest -> string -> digest
hmac dg key: returns the digest context computing the HMAC construction (RFC-2104).

The key must not be longer than dg#block_length.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml