The original HKDF implementation incorrectly handled
TypedArrays by converting them through the toBuf() function, which only
handles strings and Buffers. This caused TypedArrays to be processed
incorrectly, losing their actual byte representation.
Closes https://github.com/denoland/deno/issues/29913
---------
Co-authored-by: gitstart-app[bot] <80938352+gitstart-app[bot]@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Previously we had many different code paths all
handling digests in different places, all with
wildly different digest support. This commit
rewrites this to use a single digest handling
mechanism for all digest operations.
It adds various aliases for digest algorithms,
like node does. For example
`sha1WithRSAEncryption` is an alias for `sha1`.
It also adds support for `md5-sha1` digests in
various places.