HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python38/lib64/python3.8/site-packages/Crypto/Util/__pycache__/_number_new.cpython-38.pyc
U

�_��@sldZdddddgZddlZejddkr>ejd	d	kr>dd
lTdd�Zdd�Zd
d�Zdd�Zddd�Z	dS)z$Id$�
ceil_shift�ceil_div�	floor_div�
exact_log2�	exact_div�N��)�*cCspt|t�rt|t�s0tdt|�jt|�jf��|dkr@|dksDt�d|>d}||@rd||?dS||?SdS)z�Return ceil(n / 2**b) without performing any floating-point or division operations.

    This is done by right-shifting n by b bits and incrementing the result by 1
    if any '1' bits were shifted out.
    �&unsupported operand type(s): %r and %rrrN)�
isinstance�int�	TypeError�type�__name__�AssertionError)�n�b�mask�r�J/opt/alt/python38/lib64/python3.8/site-packages/Crypto/Util/_number_new.pyr"scCsRt|t�rt|t�s0tdt|�jt|�jf��t||�\}}|rJ|dS|SdS)zDReturn ceil(a / b) without performing any floating-point operations.r
rN�rrr
rr�divmod��ar�q�rrrrr2scCsBt|t�rt|t�s0tdt|�jt|�jf��t||�\}}|S)Nr
rrrrrr>scCs�t|t�stdt|�jf��t|�}|dkr6td��d}|dkrl|d@rZ|dkrZtd��|d7}|dL}q:|d8}|d|>ks�t�|S)z~Find and return an integer i >= 0 such that num == 2**i.

    If no such integer exists, this function raises ValueError.
    zunsupported operand type: %rrz/cannot compute logarithm of non-positive numberr�No solution could be found)rrr
rr�
ValueErrorr)�numr�irrrrEs

FcCs�t|t�rt|t�s0tdt|�jt|�jf��|dkrV|rVd}|||krttd��nt||�\}}|dkrttd��|||ks�t�|S)aFind and return an integer n such that p == n * d

    If no such integer exists, this function raises ValueError.

    Both operands must be integers.

    If the second operand is zero, this function will raise ZeroDivisionError
    unless allow_divzero is true (default: False).
    r
rr)rrr
rrrrr)�p�dZ
allow_divzerorrrrrr]s
)F)
�__revision__�__all__�sys�version_infoZCrypto.Util.py21compatrrrrrrrrr�<module>s