JWK API

class jose.jwk.ECKey(key, algorithm)

Performs signing and verification operations using ECDSA and the specified hash function

This class requires the ecdsa package to be installed.

This is based off of the implementation in PyJWT 0.3.2

SHA256()

Returns a sha256 hash object; optionally initialized with a string

SHA384()

Returns a sha384 hash object; optionally initialized with a string

SHA512()

Returns a sha512 hash object; optionally initialized with a string

class jose.jwk.HMACKey(key, algorithm)

Performs signing and verification operations using HMAC and the specified hash function.

SHA256()

Returns a sha256 hash object; optionally initialized with a string

SHA384()

Returns a sha384 hash object; optionally initialized with a string

SHA512()

Returns a sha512 hash object; optionally initialized with a string

class jose.jwk.Key(key, algorithm)

A simple interface for implementing JWK keys.

class jose.jwk.RSAKey(key, algorithm)

Performs signing and verification operations using RSASSA-PKCS-v1_5 and the specified hash function. This class requires PyCrypto package to be installed. This is based off of the implementation in PyJWT 0.3.2

SHA256 = <module 'Crypto.Hash.SHA256' from '/home/docs/checkouts/readthedocs.org/user_builds/python-jose/envs/latest/local/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg/Crypto/Hash/SHA256.pyc'>
SHA384 = <module 'Crypto.Hash.SHA384' from '/home/docs/checkouts/readthedocs.org/user_builds/python-jose/envs/latest/local/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg/Crypto/Hash/SHA384.pyc'>
SHA512 = <module 'Crypto.Hash.SHA512' from '/home/docs/checkouts/readthedocs.org/user_builds/python-jose/envs/latest/local/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg/Crypto/Hash/SHA512.pyc'>
jose.jwk.construct(key_data, algorithm=None)

Construct a Key object for the given algorithm with the given key_data.