Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions IT.Hashing.Benchmarks/Hash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace IT.Hashing.Benchmarks;
public class HashBenchmark
{
private static readonly Org.BouncyCastle.Crypto.Digests.Gost3411Digest digest94 = new();
private static readonly Gost3411_2012_512 _gost512 = new();
private static readonly Gost3411_2012_256 _gost256 = new();
private static readonly IHashAlgorithm _gost512 = new Gost3411_2012_512();
private static readonly IHashAlgorithm _gost256 = new Gost3411_2012_256();
private static readonly IHashAlgorithm _gost94Native = HashAlgorithms.CreateNativeGost3411_94();
private static readonly IHashAlgorithm _gost512Native = HashAlgorithms.CreateNativeGost3411_2012_512();
private static readonly IHashAlgorithm _gost256Native = HashAlgorithms.CreateNativeGost3411_2012_256();
Expand Down
4 changes: 2 additions & 2 deletions IT.Hashing.Gost.Native/HashAlgorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public void Reset()
_handle = CreateHandle();
}

public bool TryGetHash(Span<byte> hash, out int written)
=> _handle.TryGetHash(hash, out written);
public bool TryGetHash(Span<byte> hash, out int length)
=> _handle.TryGetHash(hash, out length);

protected abstract SafeHashHandleImpl CreateHandle();
}
Expand Down
4 changes: 2 additions & 2 deletions IT.Hashing.Gost.Native/Internal/SafeHashHandleImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public void Append(byte[] array, int start, int length)
}

[SecurityCritical]
public bool TryGetHash(Span<byte> hash, out int written)
public bool TryGetHash(Span<byte> hash, out int length)
{
return CryptoApiHelper.TryGetEndHashData(this, hash, out written);
return CryptoApiHelper.TryGetEndHashData(this, hash, out length);
}

public void Reset()
Expand Down
Loading
Loading