o
    j]                     @   s   dddZ dS )   .    c                 C   s  g }| du rdS z|dd W n t y   t}Y nw |dt| |D ]}| |||  }d}d}	|dt|D ]1}
|
|d krD|d7 }||
 }
t|
tsQt|
}
t|
dd}
t|
dkrcd	|
 }
||
d 7 }q8|d}d}|D ]"}t|ts~t|}d
|  krdk rn n|t	|7 }qs||7 }qs|dkr|
dt|d d  d |||f  q#|
dt|d d  d || |||f  q#d|S )z
	@brief Return {src} in hex dump.
	@param[in] length	{Int} Nb Bytes by row.
	@param[in] sep		{Char} For the text part, {sep} will be used for non ASCII char.
	@return {Str} The hexdump
	@note Full support for python2 and python3 !
	N r      F    0x0       z	%08x:  %-   zs  |%s|z%08x(+%04x):  %-
)	NameErrorrangelen
isinstanceintordhexreplacestripchrappendstrjoin)srclengthsepstartresultxrangeisubSrchexaisMiddlehtextc r(   /root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/asyauth/utils/hexdump.pyhexdump   sD   



*0
r*   N)r   r   r   )r*   r(   r(   r(   r)   <module>   s   