[#40] Client: Add memory optimization for hash
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
32a7e64538
commit
809bd90352
17 changed files with 170 additions and 64 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue