aboutsummaryrefslogtreecommitdiff
path: root/include/noscryptutil.h
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-08-07 15:11:19 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-08-07 15:11:19 -0400
commit7c8f910e5be9a1d86af5bdcb7e51e8092cc06cf6 (patch)
tree922b60476d8cb0229c541c0399d47f0bfc5f1890 /include/noscryptutil.h
parent4d76151802b4cc04fb89d47c35c2d876b395f1a4 (diff)
feat: added NCEncryptionGetIvSize() function and helpers
Diffstat (limited to 'include/noscryptutil.h')
-rw-r--r--include/noscryptutil.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/noscryptutil.h b/include/noscryptutil.h
index bd60c79..709f607 100644
--- a/include/noscryptutil.h
+++ b/include/noscryptutil.h
@@ -132,7 +132,7 @@ NC_EXPORT NCResult NC_CC NCUtilCipherReadOutput(
);
/*
-* Sets a property on the encryption context. Equivalent to calling NCSetEncryptionPropertyEx
+* Sets a property on the encryption context. Equivalent to calling NCEncryptionSetPropertyEx
* @param ctx A valid pointer to an encryption context
* @param property The property to set
* @param value A pointer to the value to set
@@ -176,6 +176,15 @@ NC_EXPORT NCResult NC_CC NCUtilCipherUpdate(
const NCPublicKey* pk
);
+/*
+* Gets the size of the IV(nonce) required for the encryption context.
+* @param encCtx A valid pointer to an initialized encryption context
+* @return The size of the IV in bytes, or a negative error code if the context
+* is invalid, or the version is not supported. Use NCParseErrorCode to get the error code
+* and positional argument that caused the error.
+*/
+NC_EXPORT NCResult NC_CC NCUtilCipherGetIvSize(const NCUtilCipherContext* encCtx);
+
#ifdef __cplusplus
}
#endif