From 8e3d6ea5e3c83fe42cb904b6ccc4fe2b73f76aae Mon Sep 17 00:00:00 2001 From: vnugent Date: Sat, 30 Mar 2024 09:52:55 -0400 Subject: refactor!: Some api (struct) changes and updated tests --- src/noscrypt.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/noscrypt.h') 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; -- cgit