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

Separated rbnacl hmac implementations #521

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

anakinj
Copy link
Member

@anakinj anakinj commented Oct 9, 2022

This moves the RbNaCl specific logic from the default (OpenSSL) HMAC algorithm into dedicated classes.

Why multiple? Well, in the process of extracting the logic I noticed RbNaCl is not having the key limit of 32 chars anymore, so there is now two variants for the RbNaCl implementation for backwards compatibility with pre 6.0 RbNACl versions.

Support for 'rbnacl', '< 6.0' with the fixed key length of 32 chars could be dropped in ruby-jwt 3.0.

- HMAC using OpenSSL (default)
- HMAC with RbNaCl for keys under 32 chars (rbnacl < 6.0)
- HMAC with RbNaCl (rbnacl >= 6.0)
@anakinj anakinj force-pushed the separated-rbnacl-hmac-implementations branch from db7a947 to 18888b8 Compare November 12, 2022 19:49
@anakinj anakinj merged commit f6c93c7 into jwt:main Nov 12, 2022
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

1 participant