aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-05-18 12:24:17 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-05-18 12:24:17 -0400
commit86b02540cce6015cfe4a2a56499a9a2f45d4e368 (patch)
tree5f527dda3042baa5866107ed1b1ced4cc80663d8 /include
parentd09d9330415d463ca19be9394b02ce11b3366f7e (diff)
refactor: Remove NCContext structure definition
Diffstat (limited to 'include')
-rw-r--r--include/noscrypt.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/noscrypt.h b/include/noscrypt.h
index ca958a0..8eadb15 100644
--- a/include/noscrypt.h
+++ b/include/noscrypt.h
@@ -135,11 +135,7 @@ typedef struct xonly_pubkey_struct {
/*
An opaque full library context object
*/
-typedef struct ctx_struct {
-
- void* secpCtx;
-
-} NCContext;
+typedef struct nc_ctx_struct NCContext;
/*
* The encryption arguments structure. This structure is used to pass
@@ -253,6 +249,16 @@ for dynamic allocation when context size structure is not known.
* @return The size of the context struct in bytes
*/
NC_EXPORT uint32_t NC_CC NCGetContextStructSize(void);
+
+/*
+* Obtains a pointer to the process-wide shared structure to be
+* used in single-threaded, resource constrained systems. NOTE:
+* this structure is not initalized and still requires calling
+* NCInitContext() before use.
+* @return The address of the process-wide, shared structure.
+*/
+NC_EXPORT NCContext* NC_CC NCGetSharedContext(void);
+
/*
* Initializes a context struct with the given entropy
* @param ctx A pointer to the context structure to initialize