Skip to content

Fix BLAKE2 output encoding validation#2518

Open
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-blake2-output-encoding-validation
Open

Fix BLAKE2 output encoding validation#2518
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-blake2-output-encoding-validation

Conversation

@marko1olo

Copy link
Copy Markdown

Fixes #2510.
Fixes #2511.

Summary

  • throw OperationError for unsupported BLAKE2b/BLAKE2s output encodings instead of returning it as operation output
  • avoid the follow-on Data is not a valid string: {"type":"OperationError"} error
  • add regression coverage for empty output encoding values for both operations

Checks

  • node --no-warnings --no-deprecation --openssl-legacy-provider tests/operations/index.mjs -> 1962 passing
  • npx eslint src/core/operations/BLAKE2b.mjs src/core/operations/BLAKE2s.mjs tests/operations/tests/BLAKE2b.mjs tests/operations/tests/BLAKE2s.mjs
  • npx grunt configTests
  • git diff --check

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants