Add crypto_secretbox_macbytes()
This commit is contained in:
parent
4faa73abe4
commit
e43cf109a7
@ -25,6 +25,12 @@ crypto_secretbox_boxzerobytes(void)
|
||||
return crypto_secretbox_BOXZEROBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_secretbox_macbytes(void)
|
||||
{
|
||||
return crypto_secretbox_MACBYTES;
|
||||
}
|
||||
|
||||
const char *
|
||||
crypto_secretbox_primitive(void)
|
||||
{
|
||||
|
@ -20,6 +20,11 @@ crypto_secretbox_xsalsa20poly1305_boxzerobytes(void) {
|
||||
return crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_secretbox_xsalsa20poly1305_macbytes(void) {
|
||||
return crypto_secretbox_xsalsa20poly1305_MACBYTES;
|
||||
}
|
||||
|
||||
const char *
|
||||
crypto_secretbox_xsalsa20poly1305_primitive(void) {
|
||||
return "xsalsa20poly1305";
|
||||
|
@ -26,6 +26,10 @@ size_t crypto_secretbox_zerobytes(void);
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_boxzerobytes(void);
|
||||
|
||||
#define crypto_secretbox_MACBYTES crypto_secretbox_xsalsa20poly1305_MACBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_macbytes(void);
|
||||
|
||||
#define crypto_secretbox_PRIMITIVE "xsalsa20poly1305"
|
||||
SODIUM_EXPORT
|
||||
const char *crypto_secretbox_primitive(void);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24U
|
||||
#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES 32U
|
||||
#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U
|
||||
#define crypto_secretbox_xsalsa20poly1305_MACBYTES (crypto_secretbox_xsalsa20poly1305_ZEROBYTES - crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -25,6 +26,9 @@ size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void);
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_secretbox_xsalsa20poly1305_macbytes(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
const char * crypto_secretbox_xsalsa20poly1305_primitive(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user