From 8438a924395e34ff3621a1a826faafd8626fb5b3 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 10:16:09 +0300 Subject: [PATCH 1/7] IHashAlgorithm --- IT.Hashing.Gost.Native/HashAlgorithms.cs | 30 ++++++++++++++++++- .../Internal/SafeHashHandleImpl.cs | 27 +++++++++++++++++ IT.Hashing.Gost/Gost3411_2012_256.cs | 22 ++++++++++++++ IT.Hashing.Gost/Gost3411_2012_512.cs | 24 +++++++++++++++ IT.Hashing.Gost/IHashAlgorithm.cs | 4 +++ 5 files changed, 106 insertions(+), 1 deletion(-) diff --git a/IT.Hashing.Gost.Native/HashAlgorithms.cs b/IT.Hashing.Gost.Native/HashAlgorithms.cs index 5a2be34..d63b6ff 100644 --- a/IT.Hashing.Gost.Native/HashAlgorithms.cs +++ b/IT.Hashing.Gost.Native/HashAlgorithms.cs @@ -1,5 +1,8 @@ using IT.Hashing.Gost.Native.Internal; using System; +using System.Buffers; +using System.Buffers.Text; +using System.Diagnostics; namespace IT.Hashing.Gost.Native; @@ -54,7 +57,9 @@ private abstract class Resetable_Gost3411 : IHashAlgorithm { private SafeHashHandleImpl _handle; - public virtual int Size => _handle.Size; + public abstract int Size { get; } + + public abstract int SizeInBase64 { get; } protected Resetable_Gost3411() { @@ -82,6 +87,23 @@ public void Reset() public bool TryGetHash(Span hash, out int length) => _handle.TryGetHash(hash, out length); + public bool TryGetHashInBase64(Span destination, out int length) + { + length = SizeInBase64; + if (destination.Length < length) + return false; + + var isTrue = _handle.TryGetHash(destination, out var written); + Debug.Assert(isTrue); + Debug.Assert(written == Size); + + var status = Base64.EncodeToUtf8InPlace(destination, written, out written); + Debug.Assert(status == OperationStatus.Done); + Debug.Assert(written == length); + + return true; + } + protected abstract SafeHashHandleImpl CreateHandle(); } @@ -89,6 +111,8 @@ private class Resetable_Gost3411_94 : Resetable_Gost3411 { public override int Size => 32; + public override int SizeInBase64 => 44; + protected override SafeHashHandleImpl CreateHandle() => CryptoApiHelper.CreateHash_3411_94(_provider!); } @@ -97,6 +121,8 @@ private class Resetable_Gost3411_2012_256 : Resetable_Gost3411 { public override int Size => 32; + public override int SizeInBase64 => 44; + protected override SafeHashHandleImpl CreateHandle() => CryptoApiHelper.CreateHash_3411_2012_256(_provider!); } @@ -105,6 +131,8 @@ private class Resetable_Gost3411_2012_512 : Resetable_Gost3411 { public override int Size => 64; + public override int SizeInBase64 => 88; + protected override SafeHashHandleImpl CreateHandle() => CryptoApiHelper.CreateHash_3411_2012_512(_provider!); } diff --git a/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs b/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs index 222edad..011cdd1 100644 --- a/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs +++ b/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs @@ -1,5 +1,7 @@ using Microsoft.Win32.SafeHandles; using System; +using System.Buffers; +using System.Buffers.Text; using System.Security; namespace IT.Hashing.Gost.Native.Internal; @@ -14,6 +16,8 @@ internal class SafeHashHandleImpl : SafeHandleZeroOrMinusOneIsInvalid, IHashAlgo public int Size => CryptoApiHelper.GetEndHashDataLength(this); + public int SizeInBase64 => Base64.GetMaxEncodedToUtf8Length(Size); + public SafeHashHandleImpl() : base(true) { } @@ -63,6 +67,29 @@ public bool TryGetHash(Span hash, out int length) return CryptoApiHelper.TryGetEndHashData(this, hash, out length); } + [SecurityCritical] + public bool TryGetHashInBase64(Span hash, out int length) + { + if (!CryptoApiHelper.TryGetEndHashData(this, hash, out length)) + { + length = Base64.GetMaxEncodedToUtf8Length(length); + return false; + } + + var status = Base64.EncodeToUtf8InPlace(hash, length, out var written); + if (status != OperationStatus.Done) + { + if (status == OperationStatus.DestinationTooSmall) + { + length = Base64.GetMaxEncodedToUtf8Length(length); + return false; + } + throw new InvalidOperationException($"Status is {status}"); + } + length = written; + return true; + } + public void Reset() { throw new NotImplementedException(); diff --git a/IT.Hashing.Gost/Gost3411_2012_256.cs b/IT.Hashing.Gost/Gost3411_2012_256.cs index 8481c13..e613efc 100644 --- a/IT.Hashing.Gost/Gost3411_2012_256.cs +++ b/IT.Hashing.Gost/Gost3411_2012_256.cs @@ -1,5 +1,8 @@ using IT.Hashing.Gost.Internal; using System; +using System.Buffers; +using System.Buffers.Text; +using System.Diagnostics; using System.Runtime.CompilerServices; namespace IT.Hashing.Gost; @@ -10,6 +13,8 @@ public class Gost3411_2012_256 : Gost3411_2012_512 public override int Size => 32; + public override int SizeInBase64 => 44; + /// Thrown when the instance has been disposed. [MethodImpl(MethodImplOptionsEx.OptimizedLoop)] public override bool TryGetHash(Span destination, out int length) @@ -23,6 +28,23 @@ public override bool TryGetHash(Span destination, out int length) return true; } + /// Thrown when the instance has been disposed. + [MethodImpl(MethodImplOptionsEx.OptimizedLoop)] + public override bool TryGetHashInBase64(Span destination, out int length) + { + length = 44; + if (destination.Length < length) + return false; + + BinarySpans.WriteUInt64LittleEndian(HashFinal().AsSpan(HalfBlockSizeWords, HalfBlockSizeWords), destination); + + var status = Base64.EncodeToUtf8InPlace(destination, 32, out var written); + Debug.Assert(status == OperationStatus.Done); + Debug.Assert(written == length); + + return true; + } + public override void Reset() { // IV is 0x00 for 512-bit, 0x01 for 256-bit (RFC 6986 Section 6.1) diff --git a/IT.Hashing.Gost/Gost3411_2012_512.cs b/IT.Hashing.Gost/Gost3411_2012_512.cs index 862d452..35f8807 100644 --- a/IT.Hashing.Gost/Gost3411_2012_512.cs +++ b/IT.Hashing.Gost/Gost3411_2012_512.cs @@ -2,7 +2,10 @@ using IT.Hashing.Gost.Internal; using System; +using System.Buffers; using System.Buffers.Binary; +using System.Diagnostics; +using System.Buffers.Text; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -196,6 +199,8 @@ static Gost3411_2012_512() public virtual int Size => 64; + public virtual int SizeInBase64 => 88; + public Gost3411_2012_512() { _h = new ulong[BlockSizeWords]; @@ -275,6 +280,25 @@ public virtual bool TryGetHash(Span destination, out int length) return true; } + /// Thrown when the instance has been disposed. + [MethodImpl(MethodImplOptionsEx.OptimizedLoop)] + public virtual bool TryGetHashInBase64(Span destination, out int length) + { + if (_disposed) throw new ObjectDisposedException(GetType().FullName); + + length = 88; + if (destination.Length < length) + return false; + + BinarySpans.WriteUInt64LittleEndian(HashFinal(), destination); + + var status = Base64.EncodeToUtf8InPlace(destination, 64, out var written); + Debug.Assert(status == OperationStatus.Done); + Debug.Assert(written == length); + + return true; + } + public void Dispose() { if (!_disposed) diff --git a/IT.Hashing.Gost/IHashAlgorithm.cs b/IT.Hashing.Gost/IHashAlgorithm.cs index a05b6cc..fc9f983 100644 --- a/IT.Hashing.Gost/IHashAlgorithm.cs +++ b/IT.Hashing.Gost/IHashAlgorithm.cs @@ -6,6 +6,8 @@ public interface IHashAlgorithm : IDisposable { int Size { get; } + int SizeInBase64 { get; } + void Append(byte value); void Append(ReadOnlySpan span); @@ -14,5 +16,7 @@ public interface IHashAlgorithm : IDisposable bool TryGetHash(Span hash, out int length); + bool TryGetHashInBase64(Span hash, out int length); + void Reset(); } \ No newline at end of file From ff0a983e82f566ef0e63d7d2a1cf331f15219a97 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 10:35:41 +0300 Subject: [PATCH 2/7] test --- IT.Hashing.Tests/Gost.cs | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/IT.Hashing.Tests/Gost.cs b/IT.Hashing.Tests/Gost.cs index 797d70e..640d146 100644 --- a/IT.Hashing.Tests/Gost.cs +++ b/IT.Hashing.Tests/Gost.cs @@ -20,7 +20,9 @@ public void Gost94() { _random.NextBytes(bytes); - var hash = CalcAlgorithm(nativeAlg, bytes); + nativeAlg.Append(bytes); + + var hash = ToHashAndReset(nativeAlg); var hash1 = gostNative.ComputeHash(bytes); @@ -44,13 +46,16 @@ public void Gost512() { _random.NextBytes(bytes); - var hash = CalcAlgorithm(nativeAlg, bytes); + nativeAlg.Append(bytes); + gostManaged.Append(bytes); + + var hash = ToHashAndReset(nativeAlg); var hash1 = gostNative.ComputeHash(bytes); var hash2 = DigestUtilities.CalculateDigest("GOST3411_2012_512", bytes); - var hash3 = CalcAlgorithm(gostManaged, bytes); + var hash3 = ToHashAndReset(gostManaged); Assert.That(hash.SequenceEqual(hash1), Is.True); Assert.That(hash.SequenceEqual(hash2), Is.True); @@ -71,13 +76,16 @@ public void Gost256() { _random.NextBytes(bytes); - var hash = CalcAlgorithm(nativeAlg, bytes); + nativeAlg.Append(bytes); + gostManaged.Append(bytes); + + var hash = ToHashAndReset(nativeAlg); var hash1 = gostNative.ComputeHash(bytes); var hash2 = DigestUtilities.CalculateDigest("GOST3411_2012_256", bytes); - var hash3 = CalcAlgorithm(gostManaged, bytes); + var hash3 = ToHashAndReset(gostManaged); Assert.That(hash.SequenceEqual(hash1), Is.True); Assert.That(hash.SequenceEqual(hash2), Is.True); @@ -85,10 +93,8 @@ public void Gost256() } } - private static byte[] CalcAlgorithm(IHashAlgorithm alg, ReadOnlySpan data) + private static byte[] ToHashAndReset(IHashAlgorithm alg) { - alg.Append(data); - var hash = new byte[alg.Size]; alg.TryGetHash(hash, out _); @@ -96,4 +102,14 @@ private static byte[] CalcAlgorithm(IHashAlgorithm alg, ReadOnlySpan data) return hash; } + + private static byte[] ToHashInBase64AndReset(IHashAlgorithm alg) + { + var hash = new byte[alg.SizeInBase64]; + + alg.TryGetHashInBase64(hash, out _); + alg.Reset(); + + return hash; + } } \ No newline at end of file From a02e19e59b90fe7412bb09cb128458133e1ba312 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 10:50:27 +0300 Subject: [PATCH 3/7] hashBase64 --- IT.Hashing.Gost/IHashAlgorithm.cs | 1 + IT.Hashing.Tests/Gost.cs | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/IT.Hashing.Gost/IHashAlgorithm.cs b/IT.Hashing.Gost/IHashAlgorithm.cs index fc9f983..fa78f6e 100644 --- a/IT.Hashing.Gost/IHashAlgorithm.cs +++ b/IT.Hashing.Gost/IHashAlgorithm.cs @@ -14,6 +14,7 @@ public interface IHashAlgorithm : IDisposable void Append(byte[] array, int start, int length); + //TryGetHashAndReset bool TryGetHash(Span hash, out int length); bool TryGetHashInBase64(Span hash, out int length); diff --git a/IT.Hashing.Tests/Gost.cs b/IT.Hashing.Tests/Gost.cs index 640d146..0e593cc 100644 --- a/IT.Hashing.Tests/Gost.cs +++ b/IT.Hashing.Tests/Gost.cs @@ -1,6 +1,7 @@ using IT.Hashing.Gost; using IT.Hashing.Gost.Native; using Org.BouncyCastle.Security; +using System.Text; namespace IT.Hashing.Tests; @@ -22,7 +23,11 @@ public void Gost94() nativeAlg.Append(bytes); + var hashBase64 = new byte[nativeAlg.SizeInBase64]; + nativeAlg.TryGetHashInBase64(hashBase64, out _); + var hash = ToHashAndReset(nativeAlg); + Assert.That(Encoding.UTF8.GetString(hashBase64), Is.EqualTo(Convert.ToBase64String(hash))); var hash1 = gostNative.ComputeHash(bytes); @@ -49,7 +54,11 @@ public void Gost512() nativeAlg.Append(bytes); gostManaged.Append(bytes); + var hashBase64 = new byte[nativeAlg.SizeInBase64]; + nativeAlg.TryGetHashInBase64(hashBase64, out _); + var hash = ToHashAndReset(nativeAlg); + Assert.That(Encoding.UTF8.GetString(hashBase64), Is.EqualTo(Convert.ToBase64String(hash))); var hash1 = gostNative.ComputeHash(bytes); @@ -79,7 +88,11 @@ public void Gost256() nativeAlg.Append(bytes); gostManaged.Append(bytes); + var hashBase64 = new byte[nativeAlg.SizeInBase64]; + nativeAlg.TryGetHashInBase64(hashBase64, out _); + var hash = ToHashAndReset(nativeAlg); + Assert.That(Encoding.UTF8.GetString(hashBase64), Is.EqualTo(Convert.ToBase64String(hash))); var hash1 = gostNative.ComputeHash(bytes); @@ -99,17 +112,7 @@ private static byte[] ToHashAndReset(IHashAlgorithm alg) alg.TryGetHash(hash, out _); alg.Reset(); - - return hash; - } - - private static byte[] ToHashInBase64AndReset(IHashAlgorithm alg) - { - var hash = new byte[alg.SizeInBase64]; - - alg.TryGetHashInBase64(hash, out _); - alg.Reset(); - + return hash; } } \ No newline at end of file From 9f36265559e184dae6f286d93a37568e76beb4f5 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 10:59:40 +0300 Subject: [PATCH 4/7] hash.Slice(0, length).Clear(); --- IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs b/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs index 011cdd1..5b980d5 100644 --- a/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs +++ b/IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs @@ -81,6 +81,7 @@ public bool TryGetHashInBase64(Span hash, out int length) { if (status == OperationStatus.DestinationTooSmall) { + hash.Slice(0, length).Clear(); length = Base64.GetMaxEncodedToUtf8Length(length); return false; } From 7f71ffa2f5663d6f042f98d94eac7032765da1bf Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 11:34:18 +0300 Subject: [PATCH 5/7] HashFinal --- IT.Hashing.Gost/Gost3411_2012_256.cs | 10 ++++-- IT.Hashing.Gost/Gost3411_2012_512.cs | 52 +++++++++++++++++++++++++--- IT.Hashing.Tests/Gost.cs | 7 +++- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/IT.Hashing.Gost/Gost3411_2012_256.cs b/IT.Hashing.Gost/Gost3411_2012_256.cs index e613efc..5530edb 100644 --- a/IT.Hashing.Gost/Gost3411_2012_256.cs +++ b/IT.Hashing.Gost/Gost3411_2012_256.cs @@ -23,7 +23,10 @@ public override bool TryGetHash(Span destination, out int length) if (destination.Length < length) return false; - BinarySpans.WriteUInt64LittleEndian(HashFinal().AsSpan(HalfBlockSizeWords, HalfBlockSizeWords), destination); + Span hash = stackalloc ulong[BlockSizeWords]; + HashFinal(hash); + + BinarySpans.WriteUInt64LittleEndian(hash.Slice(HalfBlockSizeWords, HalfBlockSizeWords), destination); return true; } @@ -36,7 +39,10 @@ public override bool TryGetHashInBase64(Span destination, out int length) if (destination.Length < length) return false; - BinarySpans.WriteUInt64LittleEndian(HashFinal().AsSpan(HalfBlockSizeWords, HalfBlockSizeWords), destination); + Span hash = stackalloc ulong[BlockSizeWords]; + HashFinal(hash); + + BinarySpans.WriteUInt64LittleEndian(hash.Slice(HalfBlockSizeWords, HalfBlockSizeWords), destination); var status = Base64.EncodeToUtf8InPlace(destination, 32, out var written); Debug.Assert(status == OperationStatus.Done); diff --git a/IT.Hashing.Gost/Gost3411_2012_512.cs b/IT.Hashing.Gost/Gost3411_2012_512.cs index 35f8807..95c733f 100644 --- a/IT.Hashing.Gost/Gost3411_2012_512.cs +++ b/IT.Hashing.Gost/Gost3411_2012_512.cs @@ -275,7 +275,9 @@ public virtual bool TryGetHash(Span destination, out int length) if (destination.Length < length) return false; - BinarySpans.WriteUInt64LittleEndian(HashFinal(), destination); + Span hash = stackalloc ulong[BlockSizeWords]; + HashFinal(hash); + BinarySpans.WriteUInt64LittleEndian(hash, destination); return true; } @@ -290,7 +292,9 @@ public virtual bool TryGetHashInBase64(Span destination, out int length) if (destination.Length < length) return false; - BinarySpans.WriteUInt64LittleEndian(HashFinal(), destination); + Span hash = stackalloc ulong[BlockSizeWords]; + HashFinal(hash); + BinarySpans.WriteUInt64LittleEndian(hash, destination); var status = Base64.EncodeToUtf8InPlace(destination, 64, out var written); Debug.Assert(status == OperationStatus.Done); @@ -311,6 +315,44 @@ public void Dispose() } } + [MethodImpl(MethodImplOptionsEx.OptimizedLoop)] + protected void HashFinal(Span h) + { + if (_disposed) throw new ObjectDisposedException(GetType().FullName); + + // Pad the final block: m || 1 || 0...0 + Span paddedBlock = stackalloc byte[64]; + paddedBlock.Clear(); + _buffer.AsSpan(0, _bufferLength).CopyTo(paddedBlock); + paddedBlock[_bufferLength] = 0x01; + + // Convert padded block to ulongs + Span p = stackalloc ulong[BlockSizeWords]; + BinarySpans.ReadUInt64LittleEndian(paddedBlock, p); + + Debug.Assert(h.Length == _h.Length); + _h.CopyTo(h); + + Span n = stackalloc ulong[BlockSizeWords]; + _n.CopyTo(n); + + Span sigma = stackalloc ulong[BlockSizeWords]; + _sigma.CopyTo(sigma); + + // Stage 3: Process padded block + GN(h, n, p); + + // Update N with the bit count of the final partial block + AddModulus512(n, _bufferLength * 8); + + // Update Sigma with padded block + AddBlock512(sigma, p); + + // Stage 4: Final compressions with zero + GN(h, _zeroArray, n); + GN(h, _zeroArray, sigma); + } + [MethodImpl(MethodImplOptionsEx.OptimizedLoop)] protected ulong[] HashFinal() { @@ -445,7 +487,7 @@ private static void E(ReadOnlySpan k, ReadOnlySpan m, ref Vector51 /// Uses Miyaguchi-Preneel construction. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void GN(ulong[] h, ReadOnlySpan n, ReadOnlySpan m) + private static void GN(Span h, ReadOnlySpan n, ReadOnlySpan m) { Span k = stackalloc ulong[BlockSizeWords]; Span t = stackalloc ulong[BlockSizeWords]; @@ -566,7 +608,7 @@ private static void ApplyLPS(Span data) /// Add a number of bits to the 512-bit counter (little-endian arithmetic). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void AddModulus512(ulong[] counter, int bits) + private static void AddModulus512(Span counter, int bits) { unchecked { @@ -607,7 +649,7 @@ private static void AddModulus512(ulong[] counter, int bits) /// Add two 512-bit blocks as little-endian integers modulo 2^512. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void AddBlock512(ulong[] a, ReadOnlySpan b) + private static void AddBlock512(Span a, ReadOnlySpan b) { unchecked { diff --git a/IT.Hashing.Tests/Gost.cs b/IT.Hashing.Tests/Gost.cs index 0e593cc..d16acaa 100644 --- a/IT.Hashing.Tests/Gost.cs +++ b/IT.Hashing.Tests/Gost.cs @@ -109,8 +109,13 @@ public void Gost256() private static byte[] ToHashAndReset(IHashAlgorithm alg) { var hash = new byte[alg.Size]; - alg.TryGetHash(hash, out _); + + var hash2 = new byte[alg.Size]; + alg.TryGetHash(hash2, out _); + + Assert.That(hash.SequenceEqual(hash2), Is.True); + alg.Reset(); return hash; From e5a1bdcc14f18770dfa934e8930b140bb73117d7 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 11:37:29 +0300 Subject: [PATCH 6/7] 2.0.3 --- IT.Hashing.Gost.Native/IT.Hashing.Gost.Native.csproj | 2 +- IT.Hashing.Gost/IT.Hashing.Gost.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IT.Hashing.Gost.Native/IT.Hashing.Gost.Native.csproj b/IT.Hashing.Gost.Native/IT.Hashing.Gost.Native.csproj index 3510e14..d8b39e6 100644 --- a/IT.Hashing.Gost.Native/IT.Hashing.Gost.Native.csproj +++ b/IT.Hashing.Gost.Native/IT.Hashing.Gost.Native.csproj @@ -13,7 +13,7 @@ true Ivan Tikhonov Ivan Tikhonov © 2026 - 2.0.2 + 2.0.3 Gost Hashing Native CryptoPro VipNet Readme.md Icon.png diff --git a/IT.Hashing.Gost/IT.Hashing.Gost.csproj b/IT.Hashing.Gost/IT.Hashing.Gost.csproj index c2caba0..695b2fc 100644 --- a/IT.Hashing.Gost/IT.Hashing.Gost.csproj +++ b/IT.Hashing.Gost/IT.Hashing.Gost.csproj @@ -13,7 +13,7 @@ true Ivan Tikhonov Ivan Tikhonov © 2026 - 2.0.2 + 2.0.3 Gost Hashing Managed Readme.md Icon.png From f01c7a00ccd382ef81966add84edaacc77a6c1c3 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Tue, 11 Aug 2026 11:38:55 +0300 Subject: [PATCH 7/7] fix --- IT.Hashing.Gost/IHashAlgorithm.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/IT.Hashing.Gost/IHashAlgorithm.cs b/IT.Hashing.Gost/IHashAlgorithm.cs index fa78f6e..fc9f983 100644 --- a/IT.Hashing.Gost/IHashAlgorithm.cs +++ b/IT.Hashing.Gost/IHashAlgorithm.cs @@ -14,7 +14,6 @@ public interface IHashAlgorithm : IDisposable void Append(byte[] array, int start, int length); - //TryGetHashAndReset bool TryGetHash(Span hash, out int length); bool TryGetHashInBase64(Span hash, out int length);