We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09e46a2 commit 817440bCopy full SHA for 817440b
1 file changed
doc/keyhandling.rst
@@ -70,6 +70,22 @@ RSA key from you could do like this::
70
>>> rsa_key.public_key()
71
<cryptography.hazmat.backends.openssl.rsa._RSAPublicKey object at 0x1036b1f60>
72
73
+If you are dealing with Elliptic Curve keys the equivalent would be::
74
+
75
+ >>> from cryptojwt.jwk.ec import new_ec_key
76
+ >>> ec_key = new_ec_key('P-256')
77
+ >>> type(ec_key)
78
+ <class 'cryptojwt.jwk.ec.ECKey'>
79
+ >>> ec_key.has_private_key()
80
+ True
81
82
+and::
83
84
+ >>> from cryptojwt.jwk.ec import ECKey
85
+ >>> ec_key = ECKey().load('ec-keypair.pem')
86
87
88
89
90
91
.. _cryptography: https://cryptography.io/en/latest/
0 commit comments