File: //lib/python3/dist-packages/nacl/bindings/__pycache__/crypto_scalarmult.cpython-38.pyc
U
�֫[ � @ s` d dl mZmZmZ d dlmZ d dlmZm Z d dl
mZ e �� Z
e �� Zdd� Zdd� Zd S )
� )�absolute_import�division�print_function)�
exceptions)�ffi�lib)�ensurec C s@ t �dt�}t�|| �}t|dkdtjd� t �|t �dd� S )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�ZraisingN)
r �new�crypto_scalarmult_BYTESr �crypto_scalarmult_baser �exc�RuntimeError�buffer�crypto_scalarmult_SCALARBYTES)�n�q�rc� r �A/usr/lib/python3/dist-packages/nacl/bindings/crypto_scalarmult.pyr s �r c C sB t �dt�}t�|| |�}t|dkdtjd� t �|t �dd� S )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 r r
r N)
r r r
r �crypto_scalarmultr r r r r )r �pr r r r r r , s �r N)Z
__future__r r r Znaclr r Znacl._sodiumr r Znacl.exceptionsr Zcrypto_scalarmult_bytesr
Zcrypto_scalarmult_scalarbytesr r r r r r r �<module> s