From 12feb33dba2061415d6f39fa59dec16fafcda2a0 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 21 Jul 2024 17:51:04 -0400 Subject: Push latest changes, patches, and internal upgrades --- include/noscrypt.h | 2 +- include/noscryptutil.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/noscrypt.h b/include/noscrypt.h index 8b39f17..b91bc2b 100644 --- a/include/noscrypt.h +++ b/include/noscrypt.h @@ -58,7 +58,7 @@ extern "C" { #ifdef _NC_IS_WINDOWS #define NC_EXPORT __declspec(dllimport) #else - #define NC_EXPORT + #define NC_EXPORT extern #endif /* _NC_IS_WINDOWS */ #endif /* !NOSCRYPT_EXPORTING */ #endif /* !NC_EXPORT */ diff --git a/include/noscryptutil.h b/include/noscryptutil.h index 13b9231..a5e460f 100644 --- a/include/noscryptutil.h +++ b/include/noscryptutil.h @@ -39,11 +39,13 @@ extern "C" { #define E_CIPHER_INVALID_FORMAT -11 #define E_CIPHER_BAD_NONCE -12 #define E_CIPHER_MAC_INVALID -13 +#define E_CIPHER_NO_OUTPUT -14 #define NC_UTIL_CIPHER_MODE_ENCRYPT 0x00u #define NC_UTIL_CIPHER_MODE_DECRYPT 0x01u #define NC_UTIL_CIPHER_ZERO_ON_FREE 0x02u #define NC_UTIL_CIPHER_MAC_NO_VERIFY 0x04u +#define NC_UTIL_CIPHER_REUSEABLE 0x08u /* * The encryption context structure. This structure is used to store the state @@ -166,7 +168,7 @@ NC_EXPORT NCResult NC_CC NCUtilCipherGetFlags(const NCUtilCipherContext* ctx); * so the exact same operation should happen if called again. */ NC_EXPORT NCResult NC_CC NCUtilCipherUpdate( - const NCUtilCipherContext* encCtx, + NCUtilCipherContext* encCtx, const NCContext* libContext, const NCSecretKey* sk, const NCPublicKey* pk -- cgit