EverCrypt.HMAC
Agile, multiplexing interface for HMAC
The hashing algorithms currently supported are the same as for the agile hashing interface:
For HMAC with SHA2, the output buffer is the same size as the digest size of the corresponding hash function (see here). For HMAC with BLAKE2, the output buffer is 64 bytes for BLAKE2b and 32 bytes for BLAKE2s.
val is_supported_alg : alg:SharedDefs.HashDefs.alg -> bool
is_supported_alg alg
returns true if the hashing algorithm alg
is supported in the agile HMAC interface.
val mac : alg:SharedDefs.HashDefs.alg -> key:bytes -> msg:bytes -> bytes
mac alg key msg
computes the HMAC of msg
based on hashing algorithm alg
using key key
.
module Noalloc : sig ... end
Versions of these functions which write their output in a buffer passed in as an argument