-
Notifications
You must be signed in to change notification settings - Fork 1
/
tweetnacl.h
30 lines (29 loc) · 1.72 KB
/
tweetnacl.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
typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef long long i64;
typedef i64 gf[16];
int crypto_verify_16(const u8 * x, const u8 * y);
int crypto_verify_32(const u8 * x, const u8 * y);
int crypto_core_salsa20(u8 * out, const u8 * in, const u8 * k, const u8 * c);
int crypto_core_hsalsa20(u8 * out, const u8 * in, const u8 * k, const u8 * c);
int crypto_stream_salsa20_xor(u8 * c, const u8 * m, u64 b, const u8 * n, const u8 * k);
int crypto_stream_salsa20(u8 * c, u64 d, const u8 * n, const u8 * k);
int crypto_stream(u8 * c, u64 d, const u8 * n, const u8 * k);
int crypto_stream_xor(u8 * c, const u8 * m, u64 d, const u8 * n, const u8 * k);
int crypto_onetimeauth(u8 * out, const u8 * m, u64 n, const u8 * k);
int crypto_onetimeauth_verify(const u8 * h, const u8 * m, u64 n, const u8 * k);
int crypto_secretbox(u8 * c, const u8 * m, u64 d, const u8 * n, const u8 * k);
int crypto_secretbox_open(u8 * m, const u8 * c, u64 d, const u8 * n, const u8 * k);
int crypto_scalarmult(u8 * q, const u8 * n, const u8 * p);
int crypto_scalarmult_base(u8 * q, const u8 * n);
int crypto_box_keypair(u8 * y, u8 * x);
int crypto_box_beforenm(u8 * k, const u8 * y, const u8 * x);
int crypto_box_afternm(u8 * c, const u8 * m, u64 d, const u8 * n, const u8 * k);
int crypto_box(u8 * c, const u8 * m, u64 d, const u8 * n, const u8 * y, const u8 * x);
int crypto_box_open(u8 * m, const u8 * c, u64 d, const u8 * n, const u8 * y, const u8 * x);
int crypto_hashblocks(u8 * x, const u8 * m, u64 n);
int crypto_hash(u8 * out, const u8 * m, u64 n);
int crypto_sign_keypair(u8 * pk, u8 * sk);
int crypto_sign(u8 * sm, u64 * smlen, const u8 * m, u64 n, const u8 * sk);
int crypto_sign_open(u8 * m, u64 * mlen, const u8 * sm, u64 n, const u8 * pk);