-
Notifications
You must be signed in to change notification settings - Fork 54
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
Construct JWKs generically from public and private keys #204
Construct JWKs generically from public and private keys #204
Conversation
Codecov Report
@@ Coverage Diff @@
## main #204 +/- ##
==========================================
+ Coverage 57.25% 57.81% +0.57%
==========================================
Files 32 32
Lines 3726 3840 +114
==========================================
+ Hits 2133 2220 +87
- Misses 1236 1252 +16
- Partials 357 368 +11
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, JWK is prime time
} | ||
|
||
// PrivateKeyToPrivateKeyJWK converts a private key to a PrivateKeyJWK | ||
func PrivateKeyToPrivateKeyJWK(key crypto.PrivateKey) (*PublicKeyJWK, *PrivateKeyJWK, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Have you thought about making the JWKFromRSAPrivateKey functions private? It will be a lot less functions for a user to deal with and just have the global function available to them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, let me change this. can always make them public later if needed
@decentralgabe just used this today. Thanks. really helpful |
Prereq for TBD54566975/ssi-service#105
Mostly shuffling things around to further decouple data integrity suites from JWKs.