33 #include "platform.hpp" 35 #if defined (ZMQ_USE_TWEETNACL) 37 #define crypto_box_SECRETKEYBYTES 32 38 #define crypto_box_BOXZEROBYTES 16 39 #define crypto_box_NONCEBYTES 24 40 #define crypto_box_ZEROBYTES 32 41 #define crypto_box_PUBLICKEYBYTES 32 42 #define crypto_box_BEFORENMBYTES 32 43 #define crypto_secretbox_KEYBYTES 32 44 #define crypto_secretbox_NONCEBYTES 24 45 #define crypto_secretbox_ZEROBYTES 32 46 #define crypto_secretbox_BOXZEROBYTES 16 47 typedef unsigned char u8;
48 typedef unsigned long u32;
49 typedef unsigned long long u64;
50 typedef long long i64;
56 void randombytes (
unsigned char *,
unsigned long long);
57 int randombytes_close (
void);
59 int crypto_box_keypair(u8 *y,u8 *x);
60 int crypto_box_afternm(u8 *c,
const u8 *m,u64 d,
const u8 *n,
const u8 *k);
61 int crypto_box_open_afternm(u8 *m,
const u8 *c,u64 d,
const u8 *n,
const u8 *k);
62 int crypto_box(u8 *c,
const u8 *m,u64 d,
const u8 *n,
const u8 *y,
const u8 *x);
63 int crypto_box_open(u8 *m,
const u8 *c,u64 d,
const u8 *n,
const u8 *y,
const u8 *x);
64 int crypto_box_beforenm(u8 *k,
const u8 *y,
const u8 *x);
65 int crypto_secretbox(u8 *c,
const u8 *m,u64 d,
const u8 *n,
const u8 *k);
66 int crypto_secretbox_open(u8 *m,
const u8 *c,u64 d,
const u8 *n,
const u8 *k);