jwcrypto icon indicating copy to clipboard operation
jwcrypto copied to clipboard

Add functions to generate a similar key

Open jschlyter opened this issue 11 months ago • 2 comments
trafficstars

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.

jschlyter avatar Dec 02 '24 16:12 jschlyter

Looks like a reasonable approach

simo5 avatar Dec 02 '24 17:12 simo5

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

simo5 avatar Dec 02 '24 17:12 simo5