
    @6iT	                     t    d Z ddlZddlmZ edefd       Zedefd       Zedefd       Zedefd	       Zy)
z	Encoding.    N   )	validatorvaluec                6    | rt        j                  d|       S dS )a  Return whether or not given value is a valid base16 encoding.

    Examples:
        >>> base16('a3f4b2')
        True
        >>> base16('a3f4Z1')
        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   s    V/home/azureuser/techstart-app/venv/lib/python3.12/site-packages/validators/encoding.pybase16r   
   s    $ 27288%u-AEA    c                6    | rt        j                  d|       S dS )a  Return whether or not given value is a valid base32 encoding.

    Examples:
        >>> base32('MFZWIZLTOQ======')
        True
        >>> base32('MfZW3zLT9Q======')
        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]+=*$Fr   r
   s    r   base32r      s    $ 16288$e,@5@r   c                6    | rt        j                  d|       S dS )a  Return whether or not given value is a valid base58 encoding.

    Examples:
        >>> base58('14pq6y9H2DLGahPsM4s7ugsNSD2uxpHsJx')
        True
        >>> base58('cUSECm5YzcXJwP')
        True

    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]+$Fr   r
   s    r   base58r   4   s    $ ;@288.6JUJr   c                6    | rt        j                  d|       S dS )a  Return whether or not given value is a valid base64 encoding.

    Examples:
        >>> base64('Y2hhcmFjdGVyIHNldA==')
        True
        >>> base64('cUSECm5YzcXJwP')
        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}=)?$Fr   r
   s    r   base64r   I   s(    (  	TV[\ r   )	__doc__r   utilsr   strr   r   r   r    r   r   <module>r      s     
  B# B B( A# A A( K# K K( #  r   