%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/netaddr/ip/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/netaddr/ip/__pycache__/rfc1924.cpython-312.pyc

�

ӊ�^��	��dZddlmZddlmZddlmZd�Zedd�edd	�zed
d�zgd�zZe	eee
dd
���Zd�Zd�Z
y)z&A basic implementation of RFC 1924 ;-)�)�AddrFormatError)�	IPAddress)�_zipc�|�tt|�t|�dz�D�cgc]
}t|���c}Scc}w)z2Returns all characters between low and high chars.�)�range�ord�chr)�low�high�is   �4/usr/lib/python3/dist-packages/netaddr/ip/rfc1924.py�	chr_rangers-��!�#�c�(�C��I��M�:�;�q�C��F�;�;��;s�9�0�9�A�Z�a�z)�!�#�$�%�&�(�)�*�+�-�;�<�=�>�?�@�^�_�`�{�|�}�~�Vc��t|�}t|�}g}|dkDr|j|dz�|dz}|dkDr�djt	|�D�cgc]}t
|��
c}�}dt
|�z
dz}||zScc}w)z*Convert a regular IPv6 address to base 85.r�U��r)r�int�append�join�reversed�BASE_85�len)�addr�ip�int_val�	remainder�w�encoded�leading_zeroess       r�ipv6_to_base85r?s���	�4��B��"�g�G��I�
�A�+�����2��&��B����A�+��g�g�8�I�+>�?�a�w�q�z�?�@�G��3�w�<�'�3�.�N��G�#�#��@s�Bc���t|�}t|�dk7rtd|����d}tt	|��D]\}}t
|}||d|zzz
}�t
|d�}t|�S)zC
    Convert a base 85 IPv6 address to its hexadecimal format.
    r1zInvalid base 85 IPv6 address: rr/�)�listr7r�	enumerater5�BASE_85_DICTr�str)r8�tokens�resultr
�numr9s      r�base85_to_ipv6rI-s|���$�Z�F�
�6�{�b���D�J�K�K�
�F��H�V�,�-�"���3��3����3��q��=�!��"�
�6�1�	�B��r�7�N�N)�__doc__�netaddr.corer�
netaddr.ipr�netaddr.compatrrr6�dictrrDr?rI�rJr�<module>rQsq��-�(� ��<��c�3��)�C��-�-�
�c�3���2�2���D��%��2�,�/�0��$�rJ

Zerion Mini Shell 1.0