+
     h  c                  s   a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^RI	H
t
HtHt ]P                  R8w  g   Q h]P                  ! ]4      tRtRtRtR	tR
t ! R R]
4      tR tR t]! 4       tR]R&   R tR# )i    )annotationsN)array)FileCtapHidConnectionHidDescriptorparse_report_descriptorZwin32l   H  l   H  l   H  l   H  l   H  c                  s(   a  ] tR t^*tV 3R ltRtV ;t# )LinuxCtapHidConnectionc                	s4   < \         SV `  R V,           4       R# )s    N)Zsuperwrite_packet)ZselfZpacket	__class__s   &&4/usr/lib/python3.14/site-packages/fido2/hid/linux.pyr   Z#LinuxCtapHidConnection.write_packet+   s    UV^,    ) )__name__Z
__module__Z__qualname__Z__firstlineno__r   Z__static_attributes__Z__classcell__)r      @r   r   r   *   s    - -r	   r   c                s    \        V 4      # )N)r   )Z
descriptors   &r   open_connectionr   0   s    !*--r	   c           	     s   \        V R 4      ;_uu_ 4       p\        R^ .^,          4      p\        P                  ! V\        VR4       \
        P                  ! RV4      w  r4p\        R^ .^,          4      p\        P                  ! V\        VR4      pV^8  d%   \        VRV^,
           4      P                  R4      MRp \        R^ .^@,          4      p\        P                  ! V\        VR4      pV^8  d%   \        VRV^,
           4      P                  R4      MRp\        R^ .^,          4      p\        P                  ! V\        VR4       \
        P                  ! RV4      ^ ,          p	V\        R^ .V	,          4      ,          p\        P                  ! V\        VR4       RRR4       \        XR,          4      p
\        V
4      w  r\        V XXWXX4      #   \         d    Rp Li ; i  + '       g   i     LR; i)ZrbZBTz<IHHNzutf-8z<I:i   NN)Zopenr   fcntlZioctlHIDIOCGRAWINFOstructZunpackHIDIOCGRAWNAMEZ	bytearrayZdecodeHIDIOCGRAWUNIQZOSErrorHIDIOCGRDESCSIZEHIDIOCGRDESCr   r   )ZpathZfZbufZ_ZvidZpidZlengthZnameZserialZsizeZdataZmax_in_sizeZmax_out_sizes   &            r   get_descriptorr   4   s   	dD		QC!	*+A~sD1mmFC0 C!s#QT:AG!y^
,-44W=QU	aS2X&C[[NC>FBH1*	#n!-.55g>RV  C!q!A'd3}}T3'*uS1#*%%A|S$/5 
8 SWD 7 =KsCD&QQ  	F	% 
	s2   B*G/ AGBG/G,)G/+G,,G//G?	zset[str]_failed_cachec                 s   \        \        4      p . p\        P                  ! R 4       F/  pV P                  V4        VP	                  \        V4      4       K1  	  \        P                  V 4       V#   \         d     KX  \         d@    T\        9  d1   \        P                  RTRR7       \        P                  T4        K   K  i ; i)z/dev/hidraw*zFailed opening device %sT)Zexc_info)setr   globZdiscardZappendr   Z
ValueErrorZ	ExceptionloggerZdebugZaddZdifference_update)ZstaleZdevicesZhidraws      r   list_descriptorsr   Z   s    EG))N+f	*NN>&12 , ##E*N  	 	*]*7$O!!&) +	*s   A22C	 C		9C	C	)__conditional_annotations__Z
__future__r    r   r   Zloggingr   Zsysr   Zbaser   r   r   ZplatformZ	getLoggerr
   r   r   r   r   r   r   r   r   r   r   r   Z__annotations__r   )r   r   r   <module>r      s   $ # "     
  O O ||w 			8	$  -2 -.RF %x r	   