
    i                     p    S SK JrJr  S SKJr  \\\4   r\\   r\\\S   4   r	S\S\4S jr
S\S\4S jrg	)
    )IterableUnion)Literalallobjreturnc                    [        U [        [        [        45      (       a  U R	                  5       n [        U 5      S:w  a  [        U 5      S:w  a  [        S5      e [        U S5        U $ ! [         a    [        S5      ef = f)zGet info hash(   @   z8info hash is a hexadecimal string of 40 or 60 characters   )
isinstancebytes	bytearray
memoryviewhexlen
ValueErrorint)r   s    >/app/mltbenv/lib/python3.13/site-packages/aioqbt/bittorrent.pyget_info_hashr   
   sy     #y*566ggi
3x2~#c(b.STTUC J  USTTUs   A) )A?valuec                 P    [        U [        5      (       a  U R                  5       $ U $ )zConvert info hash to str)r   r   r   )r   s    r   _info_hash_strr      s"     %yy{L    N)typingr   r   typing_extensionsr   strr   InfoHash
InfoHashesInfoHashesOrAllr   r    r   r   <module>r"      s\    " %eh

GEN23x C "( s r   