Skip to content

Unify encoding and decoding key APIs#515

Open
arckoor wants to merge 1 commit into
Keats:masterfrom
arckoor:raw-key-api-rework
Open

Unify encoding and decoding key APIs#515
arckoor wants to merge 1 commit into
Keats:masterfrom
arckoor:raw-key-api-rework

Conversation

@arckoor

@arckoor arckoor commented May 29, 2026

Copy link
Copy Markdown
Collaborator

All Signers / Verifiers except the HMAC ones manually verify the key family at construction, so do that for HMAC too.
Main motivation is that after exposing as_bytes in #452, the DecodingKeyKind::RsaModulusExponent { .. } => unreachable!() case is very much reachable by accident

@arckoor arckoor requested a review from Keats May 29, 2026 12:58
@arckoor arckoor force-pushed the raw-key-api-rework branch from a92216f to 71e2199 Compare May 29, 2026 12:59
@arckoor

arckoor commented May 29, 2026

Copy link
Copy Markdown
Collaborator Author

@Keats I've considered renaming EncodingKey::inner() to as_bytes() as well, so that enc and dec key are as similar as possible, do you have any strong feelings about that?

@Keats

Keats commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Ok to rename to as_bytes

@arckoor arckoor force-pushed the raw-key-api-rework branch from 71e2199 to f57a186 Compare June 9, 2026 20:36
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.

2 participants