📦 orlp / secudht

📄 __init__.pyc · 20 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20�
:�!Qc@s�ddlZddlZejejjejje�d��ZejZ	ej
ej�ge	_d�Z
ejZej
ej�ej
ej�ej
ej�ge_d�ZejZej
ej�ej
ej�ejej
ej�ej
ej�ge_d�ZejZej
ej�ej
ej�ejej
ej�ge_d�ZejZej
ej�ej
ej�ej
ej�ge_ddd�ZdS(i����Nted25519cCs tjd�}t|�|jS(Ni (tctypestcreate_string_buffert
c_create_seedtraw(tseed((s1c:\programming\python\secudht\ed25519\__init__.pytcreate_seed	s
cCs?tjd�tjd�}}t|||�|j|jfS(Ni i@(RRtc_create_keypairR(Rt
public_keytprivate_key((s1c:\programming\python\secudht\ed25519\__init__.pytcreate_keypairscCs2tjd�}t||t|�||�|jS(Ni@(RRtc_signtlenR(tmessageRR	t	signature((s1c:\programming\python\secudht\ed25519\__init__.pytsignscCstt||t|�|��S(N(tbooltc_verifyR(RR
R((s1c:\programming\python\secudht\ed25519\__init__.pytverify*scCs�|dk	rtj|�}n|dk	r<tj|�}nt|||�|rh|rh|j|jfS|ru|jS|r�|jSdS(N(tNoneRRtc_add_scalarR(tscalarRR	((s1c:\programming\python\secudht\ed25519\__init__.pyt
add_scalar2s(RtostCDLLtpathtjointdirnamet__file__ted25519_dllted25519_create_seedRtPOINTERtc_chartargtypesRted25519_create_keypairRR
ted25519_signRtc_size_tRted25519_verifyRRted25519_add_scalarRRR(((s1c:\programming\python\secudht\ed25519\__init__.pyt<module>s"*			6		K		<		6