|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/ |
Upload File : |
�
x�\c @` s� d d l m Z m Z m Z d d l m Z m Z d d l m Z d d l m
Z
m Z m Z m
Z
e j e � d e f d � � Y� Z e j e
� d e f d � � Y� Z d S(
i ( t absolute_importt divisiont print_function( t
exceptionst utils( t
serialization( t Ed25519PrivateKeyt Ed25519PublicKeyt _ED25519_KEY_SIZEt _ED25519_SIG_SIZEt _Ed25519PublicKeyc B` s, e Z d � Z d � Z d � Z d � Z RS( c C` s | | _ | | _ d S( N( t _backendt _evp_pkey( t selft backendt evp_pkey( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyt __init__ s c C` s� | t j j k s$ | t j j k ra | t j j k sH | t j j k rW t d � � n | j � S| t j k r� | t j j k r� t d � � n | j j | | | | j
d � S( Ns3 When using Raw both encoding and format must be Raws? format must be SubjectPublicKeyInfo when encoding is PEM or DER( R t Encodingt Rawt PublicFormatt
ValueErrort _raw_public_bytest _PEM_DERt SubjectPublicKeyInfoR t _public_key_bytesR t None( R
t encodingt format( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyt public_bytes s
c C` s� | j j j d t � } | j j j d t � } | j j j | j | | � } | j j | d k � | j j | d t k � | j j j | t � S( Ns unsigned char []s size_t *i i ( R t _ffit newR t _libt EVP_PKEY_get_raw_public_keyR t openssl_assertt buffer( R
t buft buflent res( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyR 0 s c C` s� | j j j � } | j j | | j j j k � | j j j | | j j j � } | j j j | | j j j | j j j | j j j | j � } | j j | d k � | j j j
| | t | � | t | � � } | d k r� | j j � t
j � n d S( Ni ( R R t Cryptography_EVP_MD_CTX_newR! R t NULLt gct Cryptography_EVP_MD_CTX_freet EVP_DigestVerifyInitR t EVP_DigestVerifyt lent _consume_errorsR t InvalidSignature( R
t signaturet datat
evp_md_ctxR% ( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyt verify: s !
( t __name__t
__module__R R R R2 ( ( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyR
s
t _Ed25519PrivateKeyc B` s5 e Z d � Z d � Z d � Z d � Z d � Z RS( c C` s | | _ | | _ d S( N( R R ( R
R R ( ( sT /tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ed25519.pyR O s c C` s� | j j j d t � } | j j j d t � } | j j j | j | | � } | j j | d k � | j j | d t k � | j j j | � } | j j | � S( Ns unsigned char []s size_t *i i (
R R R R R R R R! R"