Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hash algorithm option. #78

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

davidlehn
Copy link
Member

  • Add messageDigestAlgorithm option to API.
  • Add support for SHA-256, SHA-384, and SHA-512 name variations to MessageDigests.
  • Updates tests to handle hashAlgorithm option if present.

There may be a better way to handle the algorithm string normalization. This works for now. Node uses "sha384", WebCrypto uses "SHA-384", and the test suite uses "SHA384".

- Add `messageDigestAlgorithm` option to API.
- Add support for SHA-256, SHA-384, and SHA-512 name variations to
  `MessageDigests`.
- Updates tests to handle `hashAlgorithm` option if present.
@codecov-commenter
Copy link

Codecov Report

Merging #78 (a127ad0) into add-signal-support (f52439f) will decrease coverage by 0.13%.
The diff coverage is 90.90%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@                  Coverage Diff                   @@
##           add-signal-support      #78      +/-   ##
======================================================
- Coverage               93.71%   93.59%   -0.13%     
======================================================
  Files                      10       10              
  Lines                     605      609       +4     
======================================================
+ Hits                      567      570       +3     
- Misses                     38       39       +1     
Files Changed Coverage Δ
lib/index.js 56.86% <ø> (ø)
lib/MessageDigest.js 87.50% <75.00%> (-12.50%) ⬇️
lib/MessageDigest-webcrypto.js 84.61% <100.00%> (+1.28%) ⬆️
lib/URDNA2015.js 98.78% <100.00%> (ø)
lib/URDNA2015Sync.js 99.37% <100.00%> (ø)

Copy link
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@davidlehn davidlehn merged commit a39634d into add-signal-support Sep 5, 2023
7 checks passed
@davidlehn davidlehn deleted the add-hash-algorithm-support branch September 5, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants