aboutsummaryrefslogtreecommitdiff
path: root/src/noscrypt.h
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-03-30 09:52:55 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-03-30 09:52:55 -0400
commit8e3d6ea5e3c83fe42cb904b6ccc4fe2b73f76aae (patch)
tree1e233670a0ad1940085efe4628d30d312d3b0e8c /src/noscrypt.h
parente88e8420520204e20802516f01d4488bb0b1d6ea (diff)
refactor!: Some api (struct) changes and updated tests
Diffstat (limited to 'src/noscrypt.h')
-rw-r--r--src/noscrypt.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/noscrypt.h b/src/noscrypt.h
index f7265ad..0f9344a 100644
--- a/src/noscrypt.h
+++ b/src/noscrypt.h
@@ -150,10 +150,8 @@ data buffers and required nonce used for the stream cipher.
*/
typedef struct nc_encryption_struct {
- /*
- * The nonce used for the stream cipher.
- */
- uint8_t nonce[NC_ENCRYPTION_NONCE_SIZE];
+ /* The nonce used for the stream cipher. */
+ const uint8_t* nonce32;
/* The input data buffer to encrypt/decrypt */
const void* inputData;
@@ -175,10 +173,10 @@ typedef struct nc_encryption_struct {
typedef struct nc_mac_verify {
/* The message authentication code certifying the Nip44 payload */
- uint8_t mac[NC_ENCRYPTION_MAC_SIZE];
+ const uint8_t* mac32;
/* The nonce used for the original message encryption */
- uint8_t nonce[NC_ENCRYPTION_NONCE_SIZE];
+ const uint8_t* nonce32;
/* The message payload data */
const uint8_t* payload;