diff options
author | vnugent <public@vaughnnugent.com> | 2024-06-18 21:20:49 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-06-18 21:20:49 -0400 |
commit | dd50b014f7ea0dc80505f03292777f8531cf25c5 (patch) | |
tree | 17880605b5a12696e52680cbb412243d76b7495c /wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal | |
parent | ffe5d91502efc2cbf98182b7edb97ef4422f26a6 (diff) |
Push latest changes from develop merge
Diffstat (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal')
-rw-r--r-- | wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/FunctionTable.cs | 14 | ||||
-rw-r--r-- | wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/internal/NCEncryptionArgs.cs | 4 |
2 files changed, 16 insertions, 2 deletions
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<NCDecryptDelegate>(); NCVerifyMac = library.DangerousGetFunction<NCVerifyMacDelegate>(); NCComputeMac = library.DangerousGetFunction<NCComputeMacDelegate>(); + NCSetEncryptionData = library.DangerousGetFunction<NCSetEncryptionDataDelegate>(); + NCSetEncryptionProperty = library.DangerousGetFunction<NCSetEncryptionPropertyDelegate>(); + NCSetEncryptionPropertyEx = library.DangerousGetFunction<NCSetEncryptionPropertyExDelegate>(); #if DEBUG NCGetConversationKey = library.DangerousGetFunction<NCGetConversationKeyDelegate>(); @@ -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; |