Skip to content

Commit

Permalink
Add VerifyMessage overload that takes byte[]
Browse files Browse the repository at this point in the history
- We needed an additional overload method for VerifyMessage that takes byte array as oppose to string.
  • Loading branch information
sondreb committed Aug 16, 2020
1 parent 579de7e commit 2a1d8f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/External/NBitcoin/BitcoinPubKeyAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public bool VerifyMessage(string message, string signature)
return key.Hash == this.Hash;
}

public bool VerifyMessage(byte[] message, string signature)
{
PubKey key = PubKey.RecoverFromMessage(message, signature);
return key.Hash == this.Hash;
}

private KeyId _KeyId;
public KeyId Hash
{
Expand Down

0 comments on commit 2a1d8f4

Please sign in to comment.