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/CyberCP/lib/python3.10/site-packages/pyotp/contrib/__pycache__/steam.cpython-310.pyc
o

�h��@s<ddlZddlmZddlmZdZdZGdd�de�ZdS)	�N)�Optional�)�TOTP�23456789BCDFGHJKMNPQRTVWXY�c
sbeZdZdZ				ddedeedeeded	ed
df�fdd�
Zd
ed
ef�fdd�Z�Z	S)�Steamz=
    Steam's custom TOTP. Subclass of `pyotp.totp.TOTP`.
    N�r�s�name�issuer�interval�digits�returncs"||_t�j|dtj||d�dS)z�
        :param s: secret in base32 format
        :param interval: the time interval in seconds for OTP. This defaults to 30.
        :param name: account name
        :param issuer: issuer
        �
)r	r
�digestr
rN)r�super�__init__�hashlib�sha1)�selfr	r
rrr
��	__class__��F/usr/local/CyberCP/lib/python3.10/site-packages/pyotp/contrib/steam.pyrszSteam.__init__�inputc	sVt��|�}t|�}d}tt�}tt�D]}||}tt|�}||7}||}q|S)z�
        :param input: the HMAC counter value to use as the OTP input.
            Usually either the counter, or the computed integer based on the Unix timestamp
        �)r�generate_otp�int�len�STEAM_CHARS�range�STEAM_DEFAULT_DIGITS)	rr�str_code�int_code�
steam_code�total_chars�_�pos�charrrrr s
zSteam.generate_otp)NNrr)
�__name__�
__module__�__qualname__�__doc__�strrrrr�
__classcell__rrrrr
s(�������r)r�typingr�totprrr!rrrrr�<module>s