
    ^hL                         % S r SSKJrJrJr  SSKJr  SSKJr  S r	S r
S rS	 r\" \R                  5      r\\S
'   / SQrg)z miscellaneous zmq_utils wrapping    )InterruptedSystemCall	_check_rc_check_version   )ffi)libc                     [        SS5        [        U [        5      (       a  U R                  S5      n [	        [
        R                  " U 5      5      $ )zlCheck for zmq capability by name (e.g. 'ipc', 'curve')

.. versionadded:: libzmq-4.1
.. versionadded:: 14.1
)   r   zzmq.hasutf8)r   
isinstancestrencodeboolCzmq_has)
capabilitys    P/home/james-whalen/.local/lib/python3.13/site-packages/zmq/backend/cffi/utils.pyhasr      s?     69%*c""&&v.
		*%&&    c                      [         R                  " S5      n [         R                  " S5      n[        R                  " X5      n[	        U5        [         R
                  " U 5      SS [         R
                  " U5      SS 4$ )u   generate a Z85 key pair for use with zmq.CURVE security

Requires libzmq (≥ 4.0) to have been built with CURVE support.

Returns
-------
(public, secret) : two bytestrings
    The public and private key pair as 40 byte z85-encoded bytestrings.
char[64]N(   )r   newr   zmq_curve_keypairr   buffer)publicprivatercs      r   curve_keypairr      sb     WWZ Fggj!G	
		V	-BbM::fcr"CJJw$7$<<<r   c                    [        U [        5      (       a  U R                  S5      n [        SS5        [        R
                  " S5      n[        R                  " X5      n[        U5        [        R                  " U5      SS $ )uB  Compute the public key corresponding to a private key for use
with zmq.CURVE security

Requires libzmq (≥ 4.2) to have been built with CURVE support.

Parameters
----------
private
    The private key as a 40 byte z85-encoded bytestring
Returns
-------
bytestring
    The public key as a 40 byte z85-encoded bytestring.
r   )r
      curve_publicr   Nr   )
r   r   r   r   r   r   r   zmq_curve_publicr   r   )r   r   r   s      r   r"   r"   )   sd     '3..(6>*WWZ F	
		F	,BbM::fcr""r   c                 N     U " U6 n [        U5         U$ ! [         a     M"  f = f)z/make a call, retrying if interrupted with EINTR)r   r   )fargskwargsr   s       r   _retry_sys_callr(   A   s8    
X	bM I	 % 		s    
$$PYZMQ_DRAFT_API)r   r   r"   r)   N)__doc__	zmq.errorr   r   r   _cffir   r   r   r   r   r"   r(   r   r)   __annotations____all__ r   r   <module>r0      sG    &
 G F  	'="#0
 Q../ /
Er   