forked from DeckerSU/verushash-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curve25519.h
30 lines (24 loc) · 1.58 KB
/
curve25519.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/******************************************************************************
* Copyright © 2014-2018 The SuperNET Developers. *
* *
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
* the top-level directory of this distribution for the individual copyright *
* holder information and the developer policies on copyright and licensing. *
* *
* Unless otherwise agreed in a custom licensing agreement, no part of the *
* SuperNET software, including this file may be copied, modified, propagated *
* or distributed except according to the terms contained in the LICENSE file *
* *
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#ifndef CURVE25519_H_INCLUDED
#define CURVE25519_H_INCLUDED
#include <stdint.h>
#include <memory.h>
#include <string.h>
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
typedef union _bits256 bits256;
struct sha256_vstate { uint64_t length; uint32_t state[8],curlen; uint8_t buf[64]; };
void vcalc_sha256(char hashstr[(256 >> 3) * 2 + 1],uint8_t hash[256 >> 3],uint8_t *src,int32_t len);
#endif // CURVE25519_H_INCLUDED