
    (pht                    d    S SK Jr  S SKrS SKJr  S SKJr  S SKJrJ	r	J
r
  S SKJr   " S S5      rg)	    )annotationsN)constant_time)InvalidToken)HOTPHOTPHashTypes_generate_uri)Bufferc                  f    \ rS rSr  S           S	S jjrS
S jrSS jr      SS jrSrg)TOTP   Nc                .    X@l         [        XX6S9U l        g )N)enforce_key_length)
_time_stepr   _hotp)selfkeylength	algorithm	time_stepbackendr   s          `/var/www/html/venv/lib/python3.13/site-packages/cryptography/hazmat/primitives/twofactor/totp.py__init__TOTP.__init__   s     $

    c                    [        U[        [        45      (       d  [        S5      e[        XR                  -  5      nU R
                  R                  U5      $ )Nz5Time parameter must be an integer type or float type.)
isinstanceintfloat	TypeErrorr   r   generate)r   timecounters      r   r    TOTP.generate"   sK    $e--G  d__,-zz""7++r   c                p    [         R                  " U R                  U5      U5      (       d  [        S5      eg )Nz#Supplied TOTP value does not match.)r   bytes_eqr    r   )r   totpr!   s      r   verifyTOTP.verify+   s0    %%dmmD&94@@DEE Ar   c           
     `    [        U R                  SUUS[        U R                  5      4/5      $ )Nr&   period)r   r   r   r   )r   account_nameissuers      r   get_provisioning_uriTOTP.get_provisioning_uri/   s5     JJDOO,-.
 	
r   )r   r   )NT)r   r	   r   r   r   r   r   r   r   z
typing.Anyr   bool)r!   zint | floatreturnbytes)r&   r1   r!   r   r0   None)r+   strr,   z
str | Noner0   r3   )	__name__
__module____qualname____firstlineno__r   r    r'   r-   __static_attributes__ r   r   r   r      sq     ##'

 
 !	

 
 
 !
,F	
	
)3	
		
r   r   )
__future__r   typingcryptography.hazmat.primitivesr   (cryptography.hazmat.primitives.twofactorr   -cryptography.hazmat.primitives.twofactor.hotpr   r   r   cryptography.utilsr	   r   r9   r   r   <module>r@      s,   
 #  8 A 
 &%
 %
r   