Module EverCrypt.HMAC
Agile, multiplexing interface for HMAC
The hashing algorithms currently supported are the same as for the agile hashing interface:
- SHA-2 (SHA-256, SHA-384, SHA-512)
 - BLAKE2 (BLAKE2b, BLAKE2s)
 
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 -> boolis_supported_alg algreturns true if the hashing algorithmalgis supported in the agile HMAC interface.
val mac : alg:SharedDefs.HashDefs.alg -> key:bytes -> msg:bytes -> bytesmac alg key msgcomputes the HMAC ofmsgbased on hashing algorithmalgusing keykey.
module Noalloc : sig ... endVersions of these functions which write their output in a buffer passed in as an argument