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

One of the test cases for HMAC is "wrong" #23

Closed
kitsonk opened this issue May 4, 2020 · 1 comment
Closed

One of the test cases for HMAC is "wrong" #23

kitsonk opened this issue May 4, 2020 · 1 comment

Comments

@kitsonk
Copy link

kitsonk commented May 4, 2020

The following test case indicates that it is supposed to be using a Uint8Array for the secret, but is in fact using a ArrayBuffer:

testCases.sha224_hmac.Uint8Array = {
'da8f94de91d62154b55ea4e8d6eb133f6d553bcd1f1ba205b9488945': [
new ArrayBuffer(0),
'Hi There'
]
};

The sha256_hmac test properly uses a Uint8Array.

emn178 added a commit that referenced this issue Aug 30, 2023
### Fixed
- Chrome bug by workaround. #40
- deprecated `new Buffer`, replace with `Buffer.from`. #34
- dependencies and security issues. #32, #36

### Changed
- TypeScript interface, secretKey can be bytes like message. #23, #25
- remove `eval` and use `require` directly. #18, #26
@emn178
Copy link
Owner

emn178 commented Aug 30, 2023

Updated TypeScript interface in v0.10.0. It also allows ArrayBuffer, so I close this.

@emn178 emn178 closed this as completed Aug 30, 2023
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

No branches or pull requests

2 participants