Move prototypes of functions requiring padding together
This commit is contained in:
parent
2262a592e6
commit
2d380c97f3
@ -106,7 +106,7 @@ int crypto_box_open_detached_afternm(unsigned char *m, const unsigned char *c,
|
||||
unsigned long long clen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
/* -- Compatibility layer with NaCl -- */
|
||||
/* -- NaCl compatibility interface ; Requires padding -- */
|
||||
|
||||
#define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES
|
||||
SODIUM_EXPORT
|
||||
|
@ -21,14 +21,6 @@ size_t crypto_secretbox_keybytes(void);
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_noncebytes(void);
|
||||
|
||||
#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_zerobytes(void);
|
||||
|
||||
#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_boxzerobytes(void);
|
||||
|
||||
#define crypto_secretbox_MACBYTES crypto_secretbox_xsalsa20poly1305_MACBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_macbytes(void);
|
||||
@ -37,16 +29,6 @@ size_t crypto_secretbox_macbytes(void);
|
||||
SODIUM_EXPORT
|
||||
const char *crypto_secretbox_primitive(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_secretbox(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
|
||||
unsigned long long clen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_secretbox_easy(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
@ -71,6 +53,26 @@ int crypto_secretbox_open_detached(unsigned char *m,
|
||||
unsigned long long clen,
|
||||
const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
/* -- NaCl compatibility interface ; Requires padding -- */
|
||||
|
||||
#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_zerobytes(void);
|
||||
|
||||
#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_boxzerobytes(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_secretbox(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
|
||||
unsigned long long clen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -46,7 +46,7 @@ int randombytes_set_implementation(randombytes_implementation *impl);
|
||||
SODIUM_EXPORT
|
||||
const char *randombytes_implementation_name(void);
|
||||
|
||||
/* -- Compatibility layer with NaCl -- */
|
||||
/* -- NaCl compatibility interface -- */
|
||||
|
||||
SODIUM_EXPORT
|
||||
void randombytes(unsigned char * const buf, const unsigned long long buf_len);
|
||||
|
Loading…
Reference in New Issue
Block a user