Skip to content

crypto: clean up parameter validation in HKDF

  • validateByteSource internally always calls toBuf, so reuse that value instead of calling toBuf both in validateParameters and in validateByteSource.
  • Validate digest before key. This improves the error message when no arguments are specified: it now refers to the type of the first argument, not to the type of the second argument.

Merge request reports

Loading