%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/nacl/bindings/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/nacl/bindings/__pycache__/crypto_scalarmult.cpython-312.pyc

�

�f4 ��f�UddlmZddlmZmZddlmZeej�Z
ej�Ze
ed<ej�Ze
ed<dZdZe
r"ej&�Zej(�Zdedefd�Zded	edefd
�Zdedefd�Zdedefd�Zded	edefd
�Zded	edefd�Zy)�)�
exceptions)�ffi�lib)�ensure�crypto_scalarmult_BYTES�crypto_scalarmult_SCALARBYTES�n�returnc���tjdt�}tj||�}t|dk(dtj��tj|t�ddS)z�
    Computes and returns the scalar product of a standard group element and an
    integer ``n``.

    :param n: bytes
    :rtype: bytes
    �unsigned char[]r�Unexpected library error��raisingN)
r�newrr�crypto_scalarmult_baser�exc�RuntimeError�bufferr�r	�q�rcs   �A/usr/lib/python3/dist-packages/nacl/bindings/crypto_scalarmult.pyrr$sV��	���!�#:�;�A�	�	#�	#�A�q�	)�B�
�2��7�.��8H�8H�I��:�:�a�6�7��:�:��pc���tjdt�}tj|||�}t|dk(dtj��tj|t�ddS)z�
    Computes and returns the scalar product of the given group element and an
    integer ``n``.

    :param p: bytes
    :param n: bytes
    :rtype: bytes
    rrr
rN)
rrrr�crypto_scalarmultrrrrr�r	rrrs    rrr4sX��	���!�#:�;�A�	�	�	�q�!�Q�	'�B�
�2��7�.��8H�8H�I��:�:�a�6�7��:�:rc��ttdtj��tt	|t
�xrt
|�tk(djd�tj��tjdt�}tj||�}t|dk(dtj��tj |t�ddS)	a
    Computes and returns the scalar product of a standard group element and an
    integer ``n`` on the edwards25519 curve.

    :param n: a :py:data:`.crypto_scalarmult_ed25519_SCALARBYTES` long bytes
              sequence representing a scalar
    :type n: bytes
    :return: a point on the edwards25519 curve, represented as a
             :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
    :rtype: bytes
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.
    �Not available in minimal buildr�&Input must be a {} long bytes sequence�%crypto_scalarmult_ed25519_SCALARBYTESrrr
N)r�has_crypto_scalarmult_ed25519r�UnavailableError�
isinstance�bytes�lenr!�format�	TypeErrorrr�crypto_scalarmult_ed25519_BYTESr�crypto_scalarmult_ed25519_baserrrs   rr*r*Es����%�(��$�$����1�e��	<���F�;�;�0�7�7�3�	
��
�
�
�	���!�#B�C�A�	�	+�	+�A�q�	1�B�
�2��7�.��8H�8H�I��:�:�a�8�9�!�<�<rc��ttdtj��tt	|t
�xrt
|�tk(djd�tj��tjdt�}tj||�}t|dk(dtj��tj |t�ddS)	a:
    Computes and returns the scalar product of a standard group element and an
    integer ``n`` on the edwards25519 curve. The integer ``n`` is not clamped.

    :param n: a :py:data:`.crypto_scalarmult_ed25519_SCALARBYTES` long bytes
              sequence representing a scalar
    :type n: bytes
    :return: a point on the edwards25519 curve, represented as a
             :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
    :rtype: bytes
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.
    rrr r!rrr
N)rr"rr#r$r%r&r!r'r(rrr)r�&crypto_scalarmult_ed25519_base_noclamprrrs   rr,r,js����%�(��$�$����1�e��	<���F�;�;�0�7�7�3�	
��
�
�
�	���!�#B�C�A�	�	3�	3�A�q�	9�B�
�2��7�.��8H�8H�I��:�:�a�8�9�!�<�<rc�P�ttdtj��tt	|t
�xrt
|�tk(djd�tj��tt	|t
�xrt
|�tk(djd�tj��tjdt�}tj|||�}t|dk(dtj��tj |t�d	d	S)
aq
    Computes and returns the scalar product of a *clamped* integer ``n``
    and the given group element on the edwards25519 curve.
    The scalar is clamped, as done in the public key generation case,
    by setting to zero the bits in position [0, 1, 2, 255] and setting
    to one the bit in position 254.

    :param n: a :py:data:`.crypto_scalarmult_ed25519_SCALARBYTES` long bytes
              sequence representing a scalar
    :type n: bytes
    :param p: a :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
              representing a point on the edwards25519 curve
    :type p: bytes
    :return: a point on the edwards25519 curve, represented as a
             :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
    :rtype: bytes
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.
    rrr r!r)rrr
N)rr"rr#r$r%r&r!r'r(r)rrr�crypto_scalarmult_ed25519rrrs    rr.r.�s���(�%�(��$�$����1�e��	<���F�;�;�0�7�7�3�	
��
�
�
���1�e��J��Q��+J�!J�0�7�7�-�	
��
�
��	���!�#B�C�A�	�	&�	&�q�!�Q�	/�B�
�2��7�.��8H�8H�I��:�:�a�8�9�!�<�<rc�P�ttdtj��tt	|t
�xrt
|�tk(djd�tj��tt	|t
�xrt
|�tk(djd�tj��tjdt�}tj|||�}t|dk(dtj��tj |t�d	d	S)
a�
    Computes and returns the scalar product of an integer ``n``
    and the given group element on the edwards25519 curve. The integer
    ``n`` is not clamped.

    :param n: a :py:data:`.crypto_scalarmult_ed25519_SCALARBYTES` long bytes
              sequence representing a scalar
    :type n: bytes
    :param p: a :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
              representing a point on the edwards25519 curve
    :type p: bytes
    :return: a point on the edwards25519 curve, represented as a
             :py:data:`.crypto_scalarmult_ed25519_BYTES` long bytes sequence
    :rtype: bytes
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.
    rrr r!r)rrr
N)rr"rr#r$r%r&r!r'r(r)rrr�!crypto_scalarmult_ed25519_noclamprrrs    rr0r0�s���$�%�(��$�$����1�e��	<���F�;�;�0�7�7�3�	
��
�
�
���1�e��J��Q��+J�!J�0�7�7�-�	
��
�
��	���!�#B�C�A�	�	.�	.�q�!�Q�	7�B�
�2��7�.��8H�8H�I��:�:�a�8�9�!�<�<rN)�naclrr�nacl._sodiumrr�nacl.exceptionsr�bool�$PYNACL_HAS_CRYPTO_SCALARMULT_ED25519r"�crypto_scalarmult_bytesr�int�__annotations__�crypto_scalarmult_scalarbytesrr)r!�crypto_scalarmult_ed25519_bytes�%crypto_scalarmult_ed25519_scalarbytesr%rrr*r,r.r0�rr�<module>r=s�� #�!�"�!%�S�%M�%M� N��:�s�:�:�<���<�%F�S�%F�%F�%H��s�H�"#��()�%� �&I�c�&I�&I�&K�#�1��1�1�3�*�

;�e�
;��
;� ;��;�5�;�U�;�""=�e�"=��"=�J"=�e�"=��"=�J0=��0=�5�0=�U�0=�f.=��.=�5�.=�U�.=r

Zerion Mini Shell 1.0