From eefbfce0af26be62ec3b329e4ef78f12f5f71c98 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 20 Jun 2024 21:38:00 -0400 Subject: push latest c-sharp changes --- .../VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs') diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs index dbd9372..8f8c6b4 100644 --- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs +++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCContext.cs @@ -21,17 +21,16 @@ using Microsoft.Win32.SafeHandles; using VNLib.Utils.Extensions; using VNLib.Utils.Memory; -using static VNLib.Utils.Cryptography.Noscrypt.LibNoscrypt; +using VNLib.Utils.Cryptography.Noscrypt.@internal; +using static VNLib.Utils.Cryptography.Noscrypt.NoscryptLibrary; using NCResult = System.Int64; namespace VNLib.Utils.Cryptography.Noscrypt { /// - /// Represents a context for the native library + /// The noscrypt library context /// - /// The heap the handle was allocated from - /// A reference to the native library public sealed class NCContext : SafeHandleZeroOrMinusOneIsInvalid { private readonly IUnmangedHeap Heap; @@ -39,9 +38,9 @@ namespace VNLib.Utils.Cryptography.Noscrypt /// /// The library this context was created from /// - public LibNoscrypt Library { get; } + public NoscryptLibrary Library { get; } - internal NCContext(IntPtr handle, IUnmangedHeap heap, LibNoscrypt library) :base(true) + internal NCContext(IntPtr handle, IUnmangedHeap heap, NoscryptLibrary library) :base(true) { ArgumentNullException.ThrowIfNull(heap); ArgumentNullException.ThrowIfNull(library); @@ -61,7 +60,7 @@ namespace VNLib.Utils.Cryptography.Noscrypt public unsafe void Reinitalize(ref byte entropy, int size) { //Entropy must be exactly 32 bytes - ArgumentOutOfRangeException.ThrowIfNotEqual(size, CTX_ENTROPY_SIZE); + ArgumentOutOfRangeException.ThrowIfNotEqual(size, NC_CTX_ENTROPY_SIZE); this.ThrowIfClosed(); fixed (byte* p = &entropy) -- cgit