From 85ba9d3ff556eccb2822b14050853a229258233a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 4 Feb 2013 14:51:04 -0800 Subject: [PATCH] Add crypto_box_MACBYTES --- .../crypto_box/curve25519xsalsa20poly1305/ref/crypto_box.h | 1 + src/libsodium/include/sodium/crypto_box.h | 1 + .../include/sodium/crypto_box_curve25519xsalsa20poly1305.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/crypto_box.h b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/crypto_box.h index a6f1c4f6..40273020 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/crypto_box.h +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/crypto_box.h @@ -15,6 +15,7 @@ #define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES +#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) #define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305" #define crypto_box_IMPLEMENTATION crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION #define crypto_box_VERSION crypto_box_curve25519xsalsa20poly1305_VERSION diff --git a/src/libsodium/include/sodium/crypto_box.h b/src/libsodium/include/sodium/crypto_box.h index a6f1c4f6..40273020 100644 --- a/src/libsodium/include/sodium/crypto_box.h +++ b/src/libsodium/include/sodium/crypto_box.h @@ -15,6 +15,7 @@ #define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES +#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) #define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305" #define crypto_box_IMPLEMENTATION crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION #define crypto_box_VERSION crypto_box_curve25519xsalsa20poly1305_VERSION diff --git a/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h b/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h index 8f82c269..9dd6b895 100644 --- a/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +++ b/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h @@ -33,6 +33,7 @@ extern int crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char #define crypto_box_curve25519xsalsa20poly1305_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_ref_NONCEBYTES #define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ref_ZEROBYTES #define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_ref_BOXZEROBYTES +#define crypto_box_curve25519xsalsa20poly1305_MACBYTES (crypto_box_curve25519xsalsa20poly1305_ZEROBYTES - crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES) #define crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION "crypto_box/curve25519xsalsa20poly1305/ref" #ifndef crypto_box_curve25519xsalsa20poly1305_ref_VERSION #define crypto_box_curve25519xsalsa20poly1305_ref_VERSION "-"