????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/ed25519py.pyc

�
��]c@s�ddlZddlZddlmZddlmZddddd	d
dgZdZd
Zd
Z	edd�Z
dd�Zd�Z
d�ZdS(i����N(t
namedtuplei(tdjbectcrypto_signtcrypto_sign_opentcrypto_sign_keypairtKeypairtPUBLICKEYBYTEStSECRETKEYBYTEStSIGNATUREBYTESi i@tvktskcCsu|dkrtjt�}ntjdt�t|�dkrOtd��n|}t	j
|�}t|||�S(sCReturn (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(tNonetosturandomRtwarningstwarntRuntimeWarningtlent
ValueErrorRt	publickeyR(tseedtskbytestvkbytes((s9/tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyRs	cCs\t|�tkr+tdt|���n|t}|t }tj|||�}||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.sBad signing key length %d(RRRRRt	signature(tmsgR
RRtsig((s9/tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyR s

cCsht|�tkr+tdt|���ntj|t |t|�}|s`td|��n|tS(s=Return message given signature+message and the verifying key.sBad verifying key length %ds
rc != True(RRRRt
checkvalidR(tsignedR	trc((s9/tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyR,s(svkssk(RRtcollectionsRtRt__all__RRRRRRRR(((s9/tmp/pip-build-tmgNo5/wheel/wheel/signatures/ed25519py.pyt<module>s