[#40] Client: Add memory optimization for hash

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2025-03-11 22:56:28 +03:00
parent 32a7e64538
commit 809bd90352
17 changed files with 170 additions and 64 deletions

View file

@ -63,14 +63,11 @@ public static class Verifier
return signature.Key.ToByteArray().VerifyRFC6979(message.ToByteArray(), signature.Sign.ToByteArray());
}
public static bool VerifyData(this ECDsa key, byte[] data, byte[] sig)
public static bool VerifyData(this ECDsa key, ReadOnlyMemory<byte> data, byte[] sig)
{
if (key is null)
throw new ArgumentNullException(nameof(key));
if (data is null)
throw new ArgumentNullException(nameof(data));
if (sig is null)
throw new ArgumentNullException(nameof(sig));