示例#1
0
        public static bool VerifySignature(string publicKey, byte[] signedData, byte[] dataHash)
        {
            var eth = new EthECKey(publicKey.HexToByteArray(), false);

            var result = eth.Verify(dataHash, EthECDSASignature.FromDER(signedData));

            return(result);
        }
示例#2
0
 public override bool VerifyMessage(byte[] data, byte[] signature)
 {
     return(GetEcKey()
            .Verify(data, EthECDSASignature.FromDER(signature)));
 }
示例#3
0
 public override bool VerifyHash(byte[] hash, byte[] signature)
 {
     return(GetEcKey()
            .Verify(hash, EthECDSASignature.FromDER(signature)));
 }
示例#4
0
 public override bool VerifyMessage(byte[] data, byte[] signature, byte[] publicKey)
 {
     return(new EthECKey(publicKey, false)
            .Verify(data, EthECDSASignature.FromDER(signature)));
 }