관리-도구
편집 파일: sha1_crypt.cpython-39.pyc
a f�Wc� � @ s� d Z ddlZe�e�ZddlmZmZ ddlm Z ddl mZmZm Z ddlmZ ddlm mZ g ZdZG dd � d ejejejej�ZdS ) zpasslib.handlers.sha1_crypt � N)� safe_crypt� test_crypt)�h64)�u�unicode�irange)�compile_hmac� c @ s� e Zd ZdZd ZdZed�ZdZe j ZdZdZ e j ZdZdZd Zd Zedd� �Zddd�ZdZedd� �Zdd� Zedd� �Zdd� Zg d�ZdS )� sha1_crypta& This class implements the SHA1-Crypt password hash, and follows the :ref:`password-hash-api`. It supports a variable-length salt, and a variable number of rounds. The :meth:`~passlib.ifc.PasswordHash.using` method accepts the following optional keywords: :type salt: str :param salt: Optional salt string. If not specified, an 8 character one will be autogenerated (this is recommended). If specified, it must be 0-64 characters, drawn from the regexp range ``[./0-9A-Za-z]``. :type salt_size: int :param salt_size: Optional number of bytes to use when autogenerating new salts. Defaults to 8 bytes, but can be any value between 0 and 64. :type rounds: int :param rounds: Optional number of rounds to use. Defaults to 480000, must be between 1 and 4294967295, inclusive. :type relaxed: bool :param relaxed: By default, providing an invalid value for one of the other keywords will result in a :exc:`ValueError`. If ``relaxed=True``, and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning` will be issued instead. Correctable errors include ``rounds`` that are too small or too large, and ``salt`` strings that are too long. .. versionadded:: 1.6 )�saltZ salt_size�roundsz$sha1$� � �@ i S � l �� Zlinearc C s&