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

HMAC fix for the sign and verify #68

Merged
merged 1 commit into from Apr 11, 2024
Merged

HMAC fix for the sign and verify #68

merged 1 commit into from Apr 11, 2024

Conversation

olegbespalov
Copy link
Contributor

What?

This change fixes a degradation that happened after merging the #61

I found it while working on the ECDSA support, and it seems like ECDSA was also a reason why the test case was disabled #41.

Why?

Without the change our example erroring with:

./k6 run examples/sign_verify/sign-verify-hmac.js

INFO[0000] {"name":"InvalidAccessError","message":"key algorithm does not describe a HMAC key"}  source=console

@olegbespalov olegbespalov self-assigned this Apr 10, 2024
@olegbespalov olegbespalov requested a review from a team as a code owner April 10, 2024 13:42
@olegbespalov olegbespalov requested review from mstoykov and oleiade and removed request for a team April 10, 2024 13:42
@olegbespalov olegbespalov changed the title HNAC fix for the sign and verify HMAC fix for the sign and verify Apr 10, 2024
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

LGTM!

btw usually single method interfaces have er at the end of the single method name as their name. That is to say that hasHash usually should be hasher.

Not really all that important, but maybe we can fix it in another PR

@olegbespalov
Copy link
Contributor Author

Yep, and I'm trying to follow this go-convention. However, here it's not the hasher but something that has a hash() string method

@olegbespalov olegbespalov merged commit aee226d into main Apr 11, 2024
10 checks passed
@olegbespalov olegbespalov deleted the fix/hash branch April 11, 2024 05:49
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.

None yet

2 participants