From dd50b014f7ea0dc80505f03292777f8531cf25c5 Mon Sep 17 00:00:00 2001 From: vnugent Date: Tue, 18 Jun 2024 21:20:49 -0400 Subject: Push latest changes from develop merge --- .../src/internal/FunctionTable.cs | 14 ++++++++++++++ .../src/internal/NCEncryptionArgs.cs | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal') diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/FunctionTable.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/FunctionTable.cs index aa916eb..17b66b2 100644 --- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/FunctionTable.cs +++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/FunctionTable.cs @@ -38,6 +38,9 @@ namespace VNLib.Utils.Cryptography.Noscrypt.@internal public readonly NCDecryptDelegate NCDecrypt; public readonly NCVerifyMacDelegate NCVerifyMac; public readonly NCComputeMacDelegate NCComputeMac; + public readonly NCSetEncryptionDataDelegate NCSetEncryptionData; + public readonly NCSetEncryptionPropertyDelegate NCSetEncryptionProperty; + public readonly NCSetEncryptionPropertyExDelegate NCSetEncryptionPropertyEx; #if DEBUG public readonly NCGetConversationKeyDelegate NCGetConversationKey; @@ -60,6 +63,9 @@ namespace VNLib.Utils.Cryptography.Noscrypt.@internal NCDecrypt = library.DangerousGetFunction(); NCVerifyMac = library.DangerousGetFunction(); NCComputeMac = library.DangerousGetFunction(); + NCSetEncryptionData = library.DangerousGetFunction(); + NCSetEncryptionProperty = library.DangerousGetFunction(); + NCSetEncryptionPropertyEx = library.DangerousGetFunction(); #if DEBUG NCGetConversationKey = library.DangerousGetFunction(); @@ -123,5 +129,13 @@ namespace VNLib.Utils.Cryptography.Noscrypt.@internal [SafeMethodName("NCGetConversationKey")] internal delegate NCResult NCGetConversationKeyDelegate(nint ctx, NCSecretKey* sk, NCPublicKey* pk, byte* keyOut32); + [SafeMethodName("NCSetEncryptionProperty")] + internal delegate NCResult NCSetEncryptionPropertyDelegate(NCEncryptionArgs* args, uint property, uint value); + + [SafeMethodName("NCSetEncryptionPropertyEx")] + internal delegate NCResult NCSetEncryptionPropertyExDelegate(NCEncryptionArgs* args, uint property, byte* value, uint valueLen); + + [SafeMethodName("NCSetEncryptionData")] + internal delegate NCResult NCSetEncryptionDataDelegate(NCEncryptionArgs* args, byte* input, byte* output, uint dataSize); } } diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/NCEncryptionArgs.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/NCEncryptionArgs.cs index a63d3b3..91f0ff5 100644 --- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/NCEncryptionArgs.cs +++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/NCEncryptionArgs.cs @@ -21,8 +21,8 @@ namespace VNLib.Utils.Cryptography.Noscrypt.@internal [StructLayout(LayoutKind.Sequential)] internal unsafe struct NCEncryptionArgs { - public byte* nonce32; - public byte* hmacKeyOut32; + public byte* nonceData; + public byte* keyData; public byte* inputData; public byte* outputData; public uint dataSize; -- cgit