From 507409d59e121b68466cbfc594be0afdb10fa0a3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 10 May 2020 20:27:50 +0200 Subject: [PATCH] Deprecate the non-easy crypto_box API It is really too complicated to use. --- src/libsodium/include/sodium/crypto_box.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsodium/include/sodium/crypto_box.h b/src/libsodium/include/sodium/crypto_box.h index e060dd29..0008e020 100644 --- a/src/libsodium/include/sodium/crypto_box.h +++ b/src/libsodium/include/sodium/crypto_box.h @@ -141,34 +141,34 @@ int crypto_box_seal_open(unsigned char *m, const unsigned char *c, #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES SODIUM_EXPORT -size_t crypto_box_zerobytes(void); +size_t crypto_box_zerobytes(void) __attribute__ ((deprecated)); #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES SODIUM_EXPORT -size_t crypto_box_boxzerobytes(void); +size_t crypto_box_boxzerobytes(void) __attribute__ ((deprecated)); SODIUM_EXPORT int crypto_box(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *pk, const unsigned char *sk) - __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6))); + __attribute__ ((deprecated)) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6))); SODIUM_EXPORT int crypto_box_open(unsigned char *m, const unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *pk, const unsigned char *sk) - __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6))); + __attribute__ ((deprecated)) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6))); SODIUM_EXPORT int crypto_box_afternm(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_box_open_afternm(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__ ((warn_unused_result)) __attribute__ ((deprecated)) __attribute__ ((nonnull(2, 4, 5))); #ifdef __cplusplus }