add_hmac_digest used to allocate a temporary buffer with size which could be equal to the maximum fragment size. This was only necessary because hmac functions accepted a contiguous buffer as an input. This change adds variants of hmac functions which accept a vector of buffers as input (aka "gather" input), and uses these new functions to calculate digest in-place, without extra memory allocation.
add_hmac_digest
used to allocate a temporary buffer with size which could be equal to the maximum fragment size. This was only necessary becausehmac
functions accepted a contiguous buffer as an input. This change adds variants ofhmac
functions which accept a vector of buffers as input (aka "gather" input), and uses these new functions to calculate digest in-place, without extra memory allocation.