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

Adding new function that converts a ed25519 key to JWK #161

Merged
merged 3 commits into from
Aug 6, 2022

Conversation

nitro-neal
Copy link
Contributor

@nitro-neal nitro-neal commented Aug 5, 2022

This new function coverts a ed25519.PrivateKey to a JsonWebKey2020

This pr is for this issue - #160

Copy link
Member

@decentralgabe decentralgabe left a comment

Choose a reason for hiding this comment

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

thanks - can you add the same method for each of the key gen functions?

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2022

Codecov Report

Merging #161 (4f313e7) into main (1ad45a9) will increase coverage by 0.09%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
+ Coverage   53.32%   53.42%   +0.09%     
==========================================
  Files          32       32              
  Lines        3773     3785      +12     
==========================================
+ Hits         2012     2022      +10     
- Misses       1389     1391       +2     
  Partials      372      372              
Impacted Files Coverage Δ
cryptosuite/jsonwebkey2020.go 56.94% <83.33%> (+0.90%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.


// DeriveJSONWebKey2020FromRSA returns a JsonWebKey2020 value, containing both public and private keys
// for an RSA-2048 key. This function coverts a rsa.PrivateKey to a JsonWebKey2020
func DeriveJSONWebKey2020FromRSA(privKey rsa.PrivateKey) (*JSONWebKey2020, error) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: is the Derive prefix useful? What about just JSONWebKey2020From...?

@decentralgabe decentralgabe added this to the Milestone 2 milestone Aug 5, 2022
@decentralgabe decentralgabe merged commit 6c4e96d into main Aug 6, 2022
@decentralgabe decentralgabe deleted the jwk-from-did branch August 6, 2022 16:35
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

3 participants