????
| Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/ |
| Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/ed25519py.pyc |
�
��]c @ s� d d l Z d d l Z d d l m Z d d l m Z d d d d d d
d g Z d Z d
Z d
Z e d d � Z
d d � Z d � Z
d � Z d S( i����N( t
namedtuplei ( t djbect crypto_signt crypto_sign_opent crypto_sign_keypairt Keypairt PUBLICKEYBYTESt SECRETKEYBYTESt SIGNATUREBYTESi i@ t vkt skc C su | d k r t j t � } n t j d t � t | � d k rO t d � � n | } t j
| � } t | | | � S( sC Return (verifying, secret) key from a given seed, or os.urandom(32)s$ ed25519ll should choose random seed.i s% seed must be 32 random bytes or None.N( t Nonet ost urandomR t warningst warnt RuntimeWarningt lent
ValueErrorR t publickeyR ( t seedt skbytest vkbytes( ( s9 /tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyR s c C s\ t | � t k r+ t d t | � � � n | t } | t } t j | | | � } | | S( s� Return signature+message given message and secret key.
The signature is the first SIGNATUREBYTES bytes of the return value.
A copy of msg is in the remainder.s Bad signing key length %d( R R R R R t signature( t msgR
R R t sig( ( s9 /tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyR s
c C sh t | � t k r+ t d t | � � � n t j | t | t | � } | s` t d | � � n | t S( s= Return message given signature+message and the verifying key.s Bad verifying key length %ds
rc != True( R R R R t
checkvalidR ( t signedR t rc( ( s9 /tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyR , s ( s vks sk( R R t collectionsR t R t __all__R R R R R R R R ( ( ( s9 /tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyt <module> s