Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add functions to generate a similar key #361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jschlyter
Copy link

A common use-case when implementing rekeying or testing is to be able to generate a similar key to an already existing one. This PR adds a JWK.generate_similar(key) classmethod to support this, as well as a JWK.get_generate_params() to get the parameters used to generate a key. Test cases included.

Perhaps there's an easier way to do this; if so please enlighten me.

@simo5
Copy link
Member

simo5 commented Dec 2, 2024

Looks like a reasonable approach

@jschlyter jschlyter marked this pull request as ready for review December 2, 2024 17:05
@simo5
Copy link
Member

simo5 commented Dec 2, 2024

Please squash the fix in the proper patches and force push the result

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants