MCPcopy Create free account

hub / github.com/mpdavis/python-jose / functions

Functions355 in github.com/mpdavis/python-jose

↓ 44 callersMethodverify
(self, msg, sig)
jose/backends/base.py:15
↓ 30 callersMethodsign
(self, msg)
jose/backends/base.py:12
↓ 22 callersFunctionbase64url_decode
Helper method to base64url_decode a string. Args: input (bytes): A base64url_encoded string (bytes) to decode.
jose/utils.py:66
↓ 22 callersFunctionlong_to_base64
(data, size=0)
jose/utils.py:26
↓ 19 callersFunctionbase64_to_long
(data)
jose/utils.py:34
↓ 19 callersMethodencrypt
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 callersMethodpublic_key
(self)
jose/backends/base.py:18
↓ 17 callersMethoddecrypt
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 callersMethodis_public
(self)
jose/backends/rsa_backend.py:215
↓ 13 callersFunctionbase64url_encode
Helper method to base64url_encode a string. Args: input (bytes): A base64url_encoded string (bytes) to encode.
jose/utils.py:81
↓ 13 callersMethodto_pem
(self)
jose/backends/base.py:21
↓ 12 callersFunctionensure_binary
Coerce **s** to bytes.
jose/utils.py:101
↓ 10 callersFunctionnormalize_pem
(key_pem_str)
tests/algorithms/test_EC.py:65
↓ 9 callersFunctionget_pem_for_key
(key)
tests/algorithms/test_EC.py:61
↓ 8 callersMethodto_dict
(self)
jose/backends/base.py:24
↓ 6 callersMethodis_public
(self)
jose/backends/cryptography_backend.py:321
↓ 6 callersMethodpublic_key
(self)
jose/backends/cryptography_backend.py:153
↓ 5 callersMethodunwrap_key
Unwrap the the wrapped key data Args: wrapped_key (bytes): Wrapped key data to unwrap Returns: byte
jose/backends/base.py:66
↓ 5 callersMethodwrap_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 callersMethodis_public
(self)
jose/backends/cryptography_backend.py:150
↓ 4 callersMethodpublic_key
(self)
jose/backends/rsa_backend.py:218
↓ 4 callersMethodto_pem
(self, pem_format="PKCS8")
jose/backends/rsa_backend.py:223
↓ 3 callersFunction_load
(jwt)
jose/jws.py:176
↓ 3 callersMethod_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 callersFunctionb64
(x)
tests/algorithms/test_EC.py:235
↓ 3 callersMethodis_public
(self)
jose/backends/ecdsa_backend.py:111
↓ 3 callersFunctionverify
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 callersFunction_actually_invalid_private_key_pkcs8_der
()
tests/algorithms/test_RSA.py:178
↓ 2 callersFunction_auth_tag
Get ann auth tag from the provided data Args: ciphertext (bytes): Encrypted value iv (bytes): Initialization vector
jose/jwe.py:569
↓ 2 callersMethod_der_to_raw
Convert signature from DER encoding to RAW encoding.
jose/backends/cryptography_backend.py:115
↓ 2 callersFunction_get_encryption_key_mac_key_and_key_length_from_cek
(cek_bytes, enc)
jose/jwe.py:253
↓ 2 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_legacy_invalid_private_key_pkcs8_der
()
tests/algorithms/test_RSA.py:172
↓ 2 callersMethod_raw_to_der
Convert signature from RAW encoding to DER encoding.
jose/backends/cryptography_backend.py:121
↓ 2 callersMethodassert_parameters
(self, as_dict, private)
tests/algorithms/test_EC.py:204
↓ 2 callersMethodassert_parameters
(self, as_dict, private)
tests/algorithms/test_RSA.py:341
↓ 2 callersMethodassert_roundtrip
(self, key)
tests/algorithms/test_RSA.py:368
↓ 2 callersFunctioncalculate_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 callersFunctionget_random_bytes
(num_bytes)
jose/backends/native.py:11
↓ 2 callersFunctionis_pem_format
(key: bytes)
jose/utils.py:138
↓ 2 callersFunctionis_ssh_key
(key: bytes)
jose/utils.py:157
↓ 2 callersMethodpublic_key
(self)
jose/backends/cryptography_backend.py:324
↓ 2 callersMethodverify
(self, msg, sig)
jose/backends/cryptography_backend.py:142
↓ 1 callersFunction_actually_invalid_private_key_pkcs8_pem
()
tests/algorithms/test_RSA.py:186
↓ 1 callersFunction_big_endian
(int_val)
jose/jwe.py:365
↓ 1 callersFunction_compress
Compress the plaintext based on the algorithm supplied Args: zip (str): Compression Algorithm plaintext (bytes): plaintext t
jose/jwe.py:422
↓ 1 callersFunction_decompress
Decompress the plaintext based on the algorithm supplied Args: zip (str): Compression Algorithm plaintext (bytes): plaintext
jose/jwe.py:444
↓ 1 callersFunction_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 callersFunction_encode_header
(algorithm, additional_headers=None)
jose/jws.py:132
↓ 1 callersFunction_encode_payload
(payload)
jose/jws.py:147
↓ 1 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_get_cek
Get the content encryption key Args: enc (str): Encryption algorithm alg (str): kwy wrap/negotiation algorithm key (
jose/jwe.py:471
↓ 1 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_get_keys
(key)
jose/jws.py:221
↓ 1 callersFunction_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 callersFunction_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 callersMethod_process_cert
(self, key)
jose/backends/cryptography_backend.py:300
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/rsa_backend.py:175
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/native.py:47
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/ecdsa_backend.py:76
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:83
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:259
↓ 1 callersMethod_process_jwk
(self, jwk_dict)
jose/backends/cryptography_backend.py:551
↓ 1 callersFunction_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 callersFunction_sig_matches_keys
(keys, signing_input, signature, alg)
jose/jws.py:209
↓ 1 callersFunction_sign_header_and_claims
(encoded_header, encoded_claims, algorithm, key)
jose/jws.py:160
↓ 1 callersFunction_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 callersFunction_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 callersFunction_validate_claims
(claims, audience=None, issuer=None, subject=None, algorithm=None, access_token=None, options=None)
jose/jwt.py:475
↓ 1 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_verify_signature
(signing_input, header, signature, key="", algorithms=None)
jose/jws.py:253
↓ 1 callersMethoddecrypt
(self, cipher_text, iv=None, aad=None, tag=None)
jose/backends/cryptography_backend.py:478
↓ 1 callersMethodencrypt
(self, plain_text, aad=None)
jose/backends/cryptography_backend.py:455
↓ 1 callersFunctionget_key
(algorithm)
jose/jwk.py:31
↓ 1 callersFunctionget_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 callersFunctionget_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 callersFunctionint_arr_to_long
(arr)
jose/utils.py:30
↓ 1 callersFunctionlong_to_bytes
(n, blocksize=0)
jose/utils.py:10
↓ 1 callersFunctionrsa_private_key_pkcs1_to_pkcs8
Convert a PKCS1-encoded RSA private key to PKCS8.
jose/backends/_asn1.py:50
↓ 1 callersFunctionrsa_private_key_pkcs8_to_pkcs1
Convert a PKCS8-encoded RSA private key to PKCS1.
jose/backends/_asn1.py:38
↓ 1 callersFunctionrsa_public_key_pkcs1_to_pkcs8
Convert a PKCS1-encoded RSA private key to PKCS8.
jose/backends/_asn1.py:63
↓ 1 callersMethodsign
(self, msg)
jose/backends/native.py:58
↓ 1 callersMethodsign
(self, msg)
jose/backends/cryptography_backend.py:133
↓ 1 callersFunctiontimedelta_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 callersMethodto_dict
(self)
jose/backends/rsa_backend.py:245
↓ 1 callersMethodto_dict
(self)
jose/backends/native.py:64
↓ 1 callersMethodto_pem
(self)
jose/backends/cryptography_backend.py:158
↓ 1 callersMethodto_pem
(self, pem_format="PKCS8")
jose/backends/cryptography_backend.py:329
↓ 1 callersMethodunwrap_key
(self, wrapped_key)
jose/backends/cryptography_backend.py:386
next →1–100 of 355, ranked by callers