ok

Mini Shell

Direktori : /lib64/python3.6/site-packages/cryptography/hazmat/primitives/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/cryptography/hazmat/primitives/__pycache__/poly1305.cpython-36.pyc

3

l�_��@sHddlmZmZmZddlmZddlmZmZm	Z	Gdd�de
�ZdS)�)�absolute_import�division�print_function)�utils)�AlreadyFinalized�UnsupportedAlgorithm�_Reasonsc@sDeZdZdd�Zdd�Zdd�Zdd�Zed	d
��Zedd��Z	d
S)�Poly1305cCs0ddlm}|j�s tdtj��|j|�|_dS)Nr)�backendz5poly1305 is not supported by this version of OpenSSL.)Z,cryptography.hazmat.backends.openssl.backendr
Zpoly1305_supportedrrZUNSUPPORTED_MACZcreate_poly1305_ctx�_ctx)�self�keyr
�r� /usr/lib64/python3.6/poly1305.py�__init__szPoly1305.__init__cCs.|jdkrtd��tjd|�|jj|�dS)NzContext was already finalized.�data)rrrZ_check_byteslike�update)rrrrrrs
zPoly1305.updatecCs&|jdkrtd��|jj�}d|_|S)NzContext was already finalized.)rr�finalize)rZmacrrrr!s


zPoly1305.finalizecCs:tjd|�|jdkrtd��|jd}|_|j|�dS)N�tagzContext was already finalized.)r�_check_bytesrr�verify)rrZctxrrrr(s

zPoly1305.verifycCst|�}|j|�|j�S)N)r	rr)�clsr
r�prrr�generate_tag0s
zPoly1305.generate_tagcCs t|�}|j|�|j|�dS)N)r	rr)rr
rrrrrr�
verify_tag6s
zPoly1305.verify_tagN)
�__name__�
__module__�__qualname__rrrr�classmethodrrrrrrr	s
r	N)Z
__future__rrrZcryptographyrZcryptography.exceptionsrrr�objectr	rrrr�<module>s

Zerion Mini Shell 1.0