Hash.Noalloc
Versions of these functions which write their output in a buffer passed in as an argument
For digest
, its size must match the size of the digest produced by the algorithm being used:
The legacy algorithms (marked deprecated
) should NOT be used for cryptographic purposes. For these, the size of the digest is:
val hash : alg:SharedDefs.HashDefs.alg -> msg:bytes -> digest:bytes -> unit
hash alg msg digest
hashes msg
using algorithm alg
and outputs the result in digest
.