This section contains the generic implementation of RFC7517. Find how to use it in JWK Guide.
Generate a Key with the given key type, curve name or bit size.
kty – string of oct
, RSA
, EC
, OKP
crv_or_size – curve name or bit size
options – a dict of other options for Key
is_private – create a private key or public key
Key instance
Import a Key from bytes, string, PEM or dict.
Key instance
Import KeySet from string, dict or a list of keys.
KeySet instance
This is the base class for a JSON Web Key.
Check if the given key_op is supported by this key.
operation – key operation value, such as “sign”, “encrypt”.
ValueError
Represent this key as a JSON string.
Implementation of RFC7638 JSON Web Key (JWK) Thumbprint.
This class represents a JSON Web Key Set.
Represent this key as a dict of the JSON Web Key Set.
Represent this key set as a JSON string.
Find the key matches the given kid value.
kid – A string of kid
Key instance
ValueError
Key class of the oct
key type.
Get the raw key for the given key_op. This method will also check if the given key_op is supported by this key.
operation – key operation value, such as “sign”, “encrypt”.
raw key
Import a key from bytes, string, or dict data.
Generate a OctKey
with the given bit size.