1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Deprecate non-easy secretbox

This commit is contained in:
Frank Denis 2020-05-10 22:29:25 +02:00
parent 67a9e79655
commit 3f1586623c
2 changed files with 25 additions and 22 deletions

View File

@ -69,22 +69,23 @@ void crypto_secretbox_keygen(unsigned char k[crypto_secretbox_KEYBYTES])
#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
SODIUM_EXPORT
size_t crypto_secretbox_zerobytes(void);
size_t crypto_secretbox_zerobytes(void) __attribute__ ((deprecated));
#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
SODIUM_EXPORT
size_t crypto_secretbox_boxzerobytes(void);
size_t crypto_secretbox_boxzerobytes(void) __attribute__ ((deprecated));
SODIUM_EXPORT
int crypto_secretbox(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k) __attribute__ ((nonnull(1, 4, 5)));
const unsigned char *k)
__attribute__ ((deprecated)) __attribute__ ((nonnull(1, 4, 5)));
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)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
__attribute__ ((deprecated)) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}

View File

@ -30,22 +30,6 @@ size_t crypto_secretbox_xsalsa20poly1305_macbytes(void);
SODIUM_EXPORT
size_t crypto_secretbox_xsalsa20poly1305_messagebytes_max(void);
SODIUM_EXPORT
int crypto_secretbox_xsalsa20poly1305(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m,
const unsigned char *c,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES])
__attribute__ ((nonnull));
@ -54,13 +38,31 @@ void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_x
#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U
SODIUM_EXPORT
size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void);
size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void)
__attribute__ ((deprecated));
#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES \
(crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES + \
crypto_secretbox_xsalsa20poly1305_MACBYTES)
SODIUM_EXPORT
size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void);
size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void)
__attribute__ ((deprecated));
SODIUM_EXPORT
int crypto_secretbox_xsalsa20poly1305(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((deprecated)) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m,
const unsigned char *c,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((deprecated)) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}