!cXgl d dl Z d dlZd dlZddlmZ ddlmZmZmZm Z m Z mZmZ d dl Zd dl mZ d dlmZ d dlmZmZ d dlmZmZ d d lmZmZ d d lmZmZmZmZm Z m!Z!m"Z"m#Z# d dl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ dZ,n # e-$ r d Z,Y nw xY wh dZ.d Z/ G d d Z0 G d de0 Z1 G d de0 Z2e,r: G d de0 Z3 G d de0 Z4 G d de3 Z5 G d de0 Z6dS dS ) N InvalidKeyError)base64url_decodebase64url_encodeder_to_raw_signatureforce_bytesfrom_base64url_uintraw_to_der_signatureto_base64url_uint)InvalidSignature)hashes)ecpadding)EllipticCurvePrivateKeyEllipticCurvePublicKey)Ed25519PrivateKeyEd25519PublicKey) RSAPrivateKeyRSAPrivateNumbersRSAPublicKeyRSAPublicNumbersrsa_crt_dmp1rsa_crt_dmq1rsa_crt_iqmprsa_recover_prime_factors)EncodingNoEncryption PrivateFormatPublicFormatload_pem_private_keyload_pem_public_keyload_ssh_public_keyTF> ES256ES384ES512ES521EdDSAPS256PS384PS512RS256RS384RS512ES256Kc t t t j t t j t t j d} t r+| t t j t t j t t j t t j t t j t t j t t j t t j t t j t t j t t j t d | S )zE Returns the algorithms that are implemented by the library. )noneHS256HS384HS512)r, r- r. r$ r/ r% r' r&