aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-08-31 12:07:34 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-08-31 12:07:34 -0400
commit1a2429666994fa94899b1310d8aeb3f59764ed41 (patch)
tree81bad70db4a8430846592292012d5ed465057585 /src
parent225c2be092fbe6e7464de2046937989f99a419e1 (diff)
parentde9741b417ee04a54512af106b71cf388c93ea9d (diff)
Merge branch 'develop' into c-sharp
Diffstat (limited to 'src')
-rw-r--r--src/noscryptutil.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/noscryptutil.c b/src/noscryptutil.c
index 115ad04..333ef74 100644
--- a/src/noscryptutil.c
+++ b/src/noscryptutil.c
@@ -672,6 +672,19 @@ NC_EXPORT NCResult NC_CC NCUtilGetEncryptionBufferSize(uint32_t encVersion, uint
}
+NC_EXPORT NCContext* NC_CC NCUtilContextAlloc(void)
+{
+ /* Dynamically allocate context aligned and zeroed */
+ return (NCContext*)_nc_mem_alloc(1, NCGetContextStructSize());
+}
+
+
+NC_EXPORT void NC_CC NCUtilContextFree(NCContext* ctx)
+{
+ _nc_mem_free(ctx);
+}
+
+
NC_EXPORT NCUtilCipherContext* NC_CC NCUtilCipherAlloc(uint32_t encVersion, uint32_t flags)
{
NCUtilCipherContext* encCtx;