Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mpdavis/python-jose
/ functions
Functions
355 in github.com/mpdavis/python-jose
⨍
Functions
355
◇
Types & classes
54
↓ 44 callers
Method
verify
(self, msg, sig)
jose/backends/base.py:15
↓ 30 callers
Method
sign
(self, msg)
jose/backends/base.py:12
↓ 22 callers
Function
base64url_decode
Helper method to base64url_decode a string. Args: input (bytes): A base64url_encoded string (bytes) to decode.
jose/utils.py:66
↓ 22 callers
Function
long_to_base64
(data, size=0)
jose/utils.py:26
↓ 19 callers
Function
base64_to_long
(data)
jose/utils.py:34
↓ 19 callers
Method
encrypt
Encrypt the plain text and generate an auth tag if appropriate Args: plain_text (bytes): Data to encrypt aad
jose/backends/base.py:27
↓ 18 callers
Method
public_key
(self)
jose/backends/base.py:18
↓ 17 callers
Method
decrypt
Decrypt the cipher text and validate the auth tag if present Args: cipher_text (bytes): Cipher text to decrypt
jose/backends/base.py:40
↓ 16 callers
Method
is_public
(self)
jose/backends/rsa_backend.py:215
↓ 13 callers
Function
base64url_encode
Helper method to base64url_encode a string. Args: input (bytes): A base64url_encoded string (bytes) to encode.
jose/utils.py:81
↓ 13 callers
Method
to_pem
(self)
jose/backends/base.py:21
↓ 12 callers
Function
ensure_binary
Coerce **s** to bytes.
jose/utils.py:101
↓ 10 callers
Function
normalize_pem
(key_pem_str)
tests/algorithms/test_EC.py:65
↓ 9 callers
Function
get_pem_for_key
(key)
tests/algorithms/test_EC.py:61
↓ 8 callers
Method
to_dict
(self)
jose/backends/base.py:24
↓ 6 callers
Method
is_public
(self)
jose/backends/cryptography_backend.py:321
↓ 6 callers
Method
public_key
(self)
jose/backends/cryptography_backend.py:153
↓ 5 callers
Method
unwrap_key
Unwrap the the wrapped key data Args: wrapped_key (bytes): Wrapped key data to unwrap Returns: byte
jose/backends/base.py:66
↓ 5 callers
Method
wrap_key
Wrap the the plain text key data Args: key_data (bytes): Key data to wrap Returns: bytes: Wrapped k
jose/backends/base.py:54
↓ 4 callers
Method
is_public
(self)
jose/backends/cryptography_backend.py:150
↓ 4 callers
Method
public_key
(self)
jose/backends/rsa_backend.py:218
↓ 4 callers
Method
to_pem
(self, pem_format="PKCS8")
jose/backends/rsa_backend.py:223
↓ 3 callers
Function
_load
(jwt)
jose/jws.py:176
↓ 3 callers
Method
_sig_component_length
Determine the correct serialization length for an encoded signature component. This is the number of bytes required to encode the maximum key
jose/backends/cryptography_backend.py:108
↓ 3 callers
Function
b64
(x)
tests/algorithms/test_EC.py:235
↓ 3 callers
Method
is_public
(self)
jose/backends/ecdsa_backend.py:111
↓ 3 callers
Function
verify
Verifies a JWS string's signature. Args: token (str): A signed JWS to be verified. key (str or dict): A key to attempt to verify
jose/jws.py:52
↓ 2 callers
Function
_actually_invalid_private_key_pkcs8_der
()
tests/algorithms/test_RSA.py:178
↓ 2 callers
Function
_auth_tag
Get ann auth tag from the provided data Args: ciphertext (bytes): Encrypted value iv (bytes): Initialization vector
jose/jwe.py:569
↓ 2 callers
Method
_der_to_raw
Convert signature from DER encoding to RAW encoding.
jose/backends/cryptography_backend.py:115
↓ 2 callers
Function
_get_encryption_key_mac_key_and_key_length_from_cek
(cek_bytes, enc)
jose/jwe.py:253
↓ 2 callers
Function
_get_key_bytes_from_key
Get the raw key bytes from a Key object Args: key (Key): Key from which to extract the raw key bytes Returns: (bytes) ke
jose/jwe.py:512
↓ 2 callers
Function
_get_random_cek_bytes_for_enc
Get the random cek bytes based on the encryption algorithm Args: enc (str): Encryption algorithm Returns: (bytes) rando
jose/jwe.py:543
↓ 2 callers
Function
_jwe_compact_deserialize
Deserialize and verify the header and segments are appropriate. Args: jwe_bytes (bytes): The compact serialized JWE Returns:
jose/jwe.py:263
↓ 2 callers
Function
_legacy_invalid_private_key_pkcs8_der
()
tests/algorithms/test_RSA.py:172
↓ 2 callers
Method
_raw_to_der
Convert signature from RAW encoding to DER encoding.
jose/backends/cryptography_backend.py:121
↓ 2 callers
Method
assert_parameters
(self, as_dict, private)
tests/algorithms/test_EC.py:204
↓ 2 callers
Method
assert_parameters
(self, as_dict, private)
tests/algorithms/test_RSA.py:341
↓ 2 callers
Method
assert_roundtrip
(self, key)
tests/algorithms/test_RSA.py:368
↓ 2 callers
Function
calculate_at_hash
Helper method for calculating an access token hash, as described in http://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken Its valu
jose/utils.py:43
↓ 2 callers
Function
get_random_bytes
(num_bytes)
jose/backends/native.py:11
↓ 2 callers
Function
is_pem_format
(key: bytes)
jose/utils.py:138
↓ 2 callers
Function
is_ssh_key
(key: bytes)
jose/utils.py:157
↓ 2 callers
Method
public_key
(self)
jose/backends/cryptography_backend.py:324
↓ 2 callers
Method
verify
(self, msg, sig)
jose/backends/cryptography_backend.py:142
↓ 1 callers
Function
_actually_invalid_private_key_pkcs8_pem
()
tests/algorithms/test_RSA.py:186
↓ 1 callers
Function
_big_endian
(int_val)
jose/jwe.py:365
↓ 1 callers
Function
_compress
Compress the plaintext based on the algorithm supplied Args: zip (str): Compression Algorithm plaintext (bytes): plaintext t
jose/jwe.py:422
↓ 1 callers
Function
_decompress
Decompress the plaintext based on the algorithm supplied Args: zip (str): Compression Algorithm plaintext (bytes): plaintext
jose/jwe.py:444
↓ 1 callers
Function
_decrypt_and_auth
Decrypt and verify the data Args: cek_bytes (bytes): cek to derive encryption and possible auth key to verify the auth t
jose/jwe.py:215
↓ 1 callers
Function
_encode_header
(algorithm, additional_headers=None)
jose/jws.py:132
↓ 1 callers
Function
_encode_payload
(payload)
jose/jws.py:147
↓ 1 callers
Function
_encoded_header
Generate an appropriate JOSE header based on the values provided Args: alg (str): Key wrap/negotiation algorithm enc (str): E
jose/jwe.py:337
↓ 1 callers
Function
_encrypt_and_auth
Generate a content encryption key (cek) and initialization vector (iv) based on enc and alg, compress the plaintext based on zip, encrypt
jose/jwe.py:369
↓ 1 callers
Function
_gcd
Calculate the Greatest Common Divisor of a and b. Unless b==0, the result will have the same sign as b (so that when b is divided by it, the
jose/backends/rsa_backend.py:38
↓ 1 callers
Function
_get_cek
Get the content encryption key Args: enc (str): Encryption algorithm alg (str): kwy wrap/negotiation algorithm key (
jose/jwe.py:471
↓ 1 callers
Function
_get_direct_key_wrap_cek
Get the cek and wrapped cek from the encryption key direct Args: key (Key): Key provided to encryption method Return: (
jose/jwe.py:491
↓ 1 callers
Function
_get_hmac_key
Get an HMACKey for the provided encryption algorithm and key bytes Args: enc (str): Encryption algorithm mac_key_bytes (byte
jose/jwe.py:406
↓ 1 callers
Function
_get_key_wrap_cek
_get_rsa_key_wrap_cek Get the content encryption key for RSA key wrap Args: enc (str): Encryption algorithm key (Key): Key pr
jose/jwe.py:527
↓ 1 callers
Function
_get_keys
(key)
jose/jws.py:221
↓ 1 callers
Function
_jwe_compact_serialize
Generate a compact serialized JWE Args: encoded_header (bytes): Base64 URL Encoded JWE header JSON encrypted_cek (bytes): En
jose/jwe.py:590
↓ 1 callers
Function
_legacy_private_key_pkcs8_to_pkcs1
Legacy RSA private key PKCS8-to-PKCS1 conversion. .. warning:: This is incorrect parsing and only works because the legacy PKCS1-to-PKCS
jose/backends/rsa_backend.py:103
↓ 1 callers
Method
_process_cert
(self, key)
jose/backends/cryptography_backend.py:300
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/rsa_backend.py:175
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/native.py:47
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/ecdsa_backend.py:76
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:83
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:259
↓ 1 callers
Method
_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:551
↓ 1 callers
Function
_rsa_recover_prime_factors
Compute factors p and q from the private exponent d. We assume that n has no more than two factors. This function is adapted from code in PyC
jose/backends/rsa_backend.py:55
↓ 1 callers
Function
_sig_matches_keys
(keys, signing_input, signature, alg)
jose/jws.py:209
↓ 1 callers
Function
_sign_header_and_claims
(encoded_header, encoded_claims, algorithm, key)
jose/jws.py:160
↓ 1 callers
Function
_validate_at_hash
Validates that the 'at_hash' is valid. Its value is the base64url encoding of the left-most half of the hash of the octets of the ASCII
jose/jwt.py:440
↓ 1 callers
Function
_validate_aud
Validates that the 'aud' claim is valid. The "aud" (audience) claim identifies the recipients that the JWT is intended for. Each principal i
jose/jwt.py:334
↓ 1 callers
Function
_validate_claims
(claims, audience=None, issuer=None, subject=None, algorithm=None, access_token=None, options=None)
jose/jwt.py:475
↓ 1 callers
Function
_validate_exp
Validates that the 'exp' claim is valid. The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT
jose/jwt.py:304
↓ 1 callers
Function
_validate_iat
Validates that the 'iat' claim is valid. The "iat" (issued at) claim identifies the time at which the JWT was issued. This claim can be used
jose/jwt.py:253
↓ 1 callers
Function
_validate_iss
Validates that the 'iss' claim is valid. The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim
jose/jwt.py:370
↓ 1 callers
Function
_validate_jti
Validates that the 'jti' claim is valid. The "jti" (JWT ID) claim provides a unique identifier for the JWT. The identifier value MUST be assi
jose/jwt.py:418
↓ 1 callers
Function
_validate_nbf
Validates that the 'nbf' claim is valid. The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for proce
jose/jwt.py:274
↓ 1 callers
Function
_validate_sub
Validates that the 'sub' claim is valid. The "sub" (subject) claim identifies the principal that is the subject of the JWT. The claims in a
jose/jwt.py:391
↓ 1 callers
Function
_verify_signature
(signing_input, header, signature, key="", algorithms=None)
jose/jws.py:253
↓ 1 callers
Method
decrypt
(self, cipher_text, iv=None, aad=None, tag=None)
jose/backends/cryptography_backend.py:478
↓ 1 callers
Method
encrypt
(self, plain_text, aad=None)
jose/backends/cryptography_backend.py:455
↓ 1 callers
Function
get_key
(algorithm)
jose/jwk.py:31
↓ 1 callers
Function
get_unverified_header
Returns the decoded headers without verification of any kind. Args: token (str): A signed JWT to decode the headers from. Returns:
jose/jwt.py:187
↓ 1 callers
Function
get_unverified_header
Returns the decoded headers without verification of any kind. Args: token (str): A signed JWS to decode the headers from. Returns:
jose/jws.py:82
↓ 1 callers
Function
int_arr_to_long
(arr)
jose/utils.py:30
↓ 1 callers
Function
long_to_bytes
(n, blocksize=0)
jose/utils.py:10
↓ 1 callers
Function
rsa_private_key_pkcs1_to_pkcs8
Convert a PKCS1-encoded RSA private key to PKCS8.
jose/backends/_asn1.py:50
↓ 1 callers
Function
rsa_private_key_pkcs8_to_pkcs1
Convert a PKCS8-encoded RSA private key to PKCS1.
jose/backends/_asn1.py:38
↓ 1 callers
Function
rsa_public_key_pkcs1_to_pkcs8
Convert a PKCS1-encoded RSA private key to PKCS8.
jose/backends/_asn1.py:63
↓ 1 callers
Method
sign
(self, msg)
jose/backends/native.py:58
↓ 1 callers
Method
sign
(self, msg)
jose/backends/cryptography_backend.py:133
↓ 1 callers
Function
timedelta_total_seconds
Helper method to determine the total number of seconds from a timedelta. Args: delta (timedelta): A timedelta to convert to seconds.
jose/utils.py:91
↓ 1 callers
Method
to_dict
(self)
jose/backends/rsa_backend.py:245
↓ 1 callers
Method
to_dict
(self)
jose/backends/native.py:64
↓ 1 callers
Method
to_pem
(self)
jose/backends/cryptography_backend.py:158
↓ 1 callers
Method
to_pem
(self, pem_format="PKCS8")
jose/backends/cryptography_backend.py:329
↓ 1 callers
Method
unwrap_key
(self, wrapped_key)
jose/backends/cryptography_backend.py:386
next →
1–100 of 355, ranked by callers