Function bearssl::br_multihash_out
[−]
[src]
pub unsafe extern "C" fn br_multihash_out(
ctx: *const br_multihash_context,
id: c_int,
dst: *mut c_void
) -> usize
\brief Compute a hash output from a multi-hasher.
The hash output for the concatenation of all bytes injected in the
provided context since the last initialisation or reset call, is
computed and written in the buffer pointed to by dst
. The hash
function to use is identified by id
and must be one of the standard
hash functions. If that hash function was indeed configured in the
multi-hasher context, the corresponding hash value is written in
dst
and its length (in bytes) is returned. If the hash function
was not configured, then nothing is written in dst
and 0 is
returned.
The context itself is not modified, so extra bytes may be injected afterwards to continue the hash computations.
\param ctx pointer to the context structure. \param id the hash function symbolic identifier. \param dst destination buffer for the hash output. \return the hash output length (in bytes), or 0.