관리-도구
편집 파일: argon2.cpython-39.pyc
a f�Wc� � @ s� d Z ddlmZmZ ddlZe�e�ZddlZddl Z ddl mZ dZda ddlmZ ddlmZ ddlmZmZmZ ddlmZmZ dd lmZmZmZmZmZ ddlm m!Z" d gZ#ed�Z$ed�Z%ed �Z&e&e$e%fZ'e(e'�Z)dZ*zddl+ZW n e,�y dZY n,0 e-ed��s$dZ*dZne-ed��s8dZ*dZe-ed��rVe�.� Z/ej0j1Z2nG dd� d�Z3e3� Z/dZ2G dd� de"j4e"j5e"j6e"j7e"j8e"j9�Z:G dd� de:�Z;G dd� de:�Z<G dd� de:�Z=G dd � d e;e:�Z+dS )a� passlib.handlers.argon2 -- argon2 password hash wrapper References ========== * argon2 - home: https://github.com/P-H-C/phc-winner-argon2 - whitepaper: https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf * argon2 cffi wrapper - pypi: https://pypi.python.org/pypi/argon2_cffi - home: https://github.com/hynek/argon2_cffi * argon2 pure python - pypi: https://pypi.python.org/pypi/argon2pure - home: https://github.com/bwesterb/argon2pure � )�with_statement�absolute_importN)�warn)�exc)� MAX_UINT32)� classproperty�to_bytes�render_bytes)�b64s_encode�b64s_decode)�u�unicode� bascii_to_str� uascii_to_str�PY2�argon2�i�d�id�Typezb'argon2' module points to unsupported 'argon2' pypi package; please install 'argon2-cffi' instead.� low_levelz@'argon2-cffi' is too old, please update to argon2_cffi >= 18.2.0�PasswordHasherc @ s$ e Zd ZdZdZdZdZdZdZdS )�_DummyCffiHashera dummy object to use as source of defaults when argon2_cffi isn't present. this tries to mimic the attributes of ``argon2.PasswordHasher()`` which the rest of this module reads. .. note:: values last synced w/ argon2 19.2 as of 2019-11-09 � i � N) �__name__� __module__�__qualname__�__doc__� time_cost�memory_cost�parallelism�salt_len�hash_len� r$ r$ �;/usr/lib/python3.9/site-packages/passlib/handlers/argon2.pyr ] s r � c sf e Zd ZdZdZdZejZe j jd Ze j jd Zej ZdZeZejZdZeZdZd ZeZd ZdZdZdZi Zed d� �Z e!Z"ej#Z#eZ$ej%Z%e&dd� �Z'd Z(e)d.� fdd� �Z*e)dd� �Z+e,�-d�Z.e)dd� �Z/e,�-de,j0�Z1e)dd� �Z2dd� Z3d/� fdd� Z4e)dd � �Z5e)d!d"� �Z6e)d0d#d$��Z7e)d%d&� �Z8� fd'd(�Z9d)Z:e)d*d+� �Z;e)d1d,d-��Z<� Z=S )2� _Argon2Commona& Base class which implements brunt of Argon2 code. This is then subclassed by the various backends, to override w/ backend-specific methods. When a backend is loaded, the bases of the 'argon2' class proper are modified to prepend the correct backend-specific subclass. r ) �salt� salt_sizer"