Esempio n. 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);
        }
Esempio n. 2
0
 public override bool VerifyMessage(byte[] data, byte[] signature)
 {
     return(GetEcKey()
            .Verify(data, EthECDSASignature.FromDER(signature)));
 }
Esempio n. 3
0
 public override bool VerifyHash(byte[] hash, byte[] signature)
 {
     return(GetEcKey()
            .Verify(hash, EthECDSASignature.FromDER(signature)));
 }
Esempio n. 4
0
 public override bool VerifyMessage(byte[] data, byte[] signature, byte[] publicKey)
 {
     return(new EthECKey(publicKey, false)
            .Verify(data, EthECDSASignature.FromDER(signature)));
 }