aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/noscrypt.h2
-rw-r--r--include/noscryptutil.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/noscrypt.h b/include/noscrypt.h
index b91bc2b..de5d2ac 100644
--- a/include/noscrypt.h
+++ b/include/noscrypt.h
@@ -85,7 +85,7 @@ extern "C" {
* https://github.com/nostr-protocol/nips/blob/master/44.md#decryption
*/
#define NIP44_MIN_ENC_MESSAGE_SIZE 0x01
-#define NIP44_MAX_ENC_MESSAGE_SIZE 0xffff
+#define NIP44_MAX_ENC_MESSAGE_SIZE UINT16_MAX
#define NC_ENC_VERSION_NIP04 0x04
#define NC_ENC_VERSION_NIP44 0x2c
diff --git a/include/noscryptutil.h b/include/noscryptutil.h
index a5e460f..bd60c79 100644
--- a/include/noscryptutil.h
+++ b/include/noscryptutil.h
@@ -40,6 +40,8 @@ extern "C" {
#define E_CIPHER_BAD_NONCE -12
#define E_CIPHER_MAC_INVALID -13
#define E_CIPHER_NO_OUTPUT -14
+#define E_CIPHER_BAD_INPUT -15
+#define E_CIPHER_BAD_INPUT_SIZE -16
#define NC_UTIL_CIPHER_MODE_ENCRYPT 0x00u
#define NC_UTIL_CIPHER_MODE_DECRYPT 0x01u