1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-24 12:36:01 -07:00

Move prototypes of functions requiring padding together

This commit is contained in:
Frank Denis 2015-01-06 18:28:07 +01:00
parent 2262a592e6
commit 2d380c97f3
3 changed files with 22 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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);