HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib/python3.10/site-packages/validators/__pycache__/encoding.cpython-310.pyc
o

��h�	�@sddZddlZddlmZedefdd��Zedefdd	��Zedefd
d��Zedefdd
��ZdS)z	Encoding.�N�)�	validator�valuecC�|rt�d|�SdS)a�Return whether or not given value is a valid base16 encoding.

    Examples:
        >>> base16('a3f4b2')
        # Output: True
        >>> base16('a3f4Z1')
        # Output: ValidationError(func=base16, args={'value': 'a3f4Z1'})

    Args:
        value:
            base16 string to validate.

    Returns:
        (Literal[True]): If `value` is a valid base16 encoding.
        (ValidationError): If `value` is an invalid base16 encoding.
    z^[0-9A-Fa-f]+$F��re�match�r�r
�I/usr/local/CyberPanel/lib/python3.10/site-packages/validators/encoding.py�base16
�rcCr)a�Return whether or not given value is a valid base32 encoding.

    Examples:
        >>> base32('MFZWIZLTOQ======')
        # Output: True
        >>> base32('MfZW3zLT9Q======')
        # Output: ValidationError(func=base32, args={'value': 'MfZW3zLT9Q======'})

    Args:
        value:
            base32 string to validate.

    Returns:
        (Literal[True]): If `value` is a valid base32 encoding.
        (ValidationError): If `value` is an invalid base32 encoding.
    z
^[A-Z2-7]+=*$Frr	r
r
r�base32r
rcCr)a�Return whether or not given value is a valid base58 encoding.

    Examples:
        >>> base58('14pq6y9H2DLGahPsM4s7ugsNSD2uxpHsJx')
        # Output: True
        >>> base58('cUSECm5YzcXJwP')
        # Output: ValidationError(func=base58, args={'value': 'cUSECm5YzcXJwP'})

    Args:
        value:
            base58 string to validate.

    Returns:
        (Literal[True]): If `value` is a valid base58 encoding.
        (ValidationError): If `value` is an invalid base58 encoding.
    z^[1-9A-HJ-NP-Za-km-z]+$Frr	r
r
r�base584r
rcCr)a�Return whether or not given value is a valid base64 encoding.

    Examples:
        >>> base64('Y2hhcmFjdGVyIHNldA==')
        # Output: True
        >>> base64('cUSECm5YzcXJwP')
        # Output: ValidationError(func=base64, args={'value': 'cUSECm5YzcXJwP'})

    Args:
        value:
            base64 string to validate.

    Returns:
        (Literal[True]): If `value` is a valid base64 encoding.
        (ValidationError): If `value` is an invalid base64 encoding.
    z@^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$Frr	r
r
r�base64Is
���r)	�__doc__r�utilsr�strrrrrr
r
r
r�<module>s