示例#1
0
 protected readonly byte[] vch; // used to export the ECDSAKey
 protected Key(byte[] data, bool isPrivateKey)
 {
     vch      = data;
     ECDSAKey = new ECDSAKey(data, isPrivateKey);
 }
示例#2
0
        public bool Verify(Hash256 hash, SignatureByte signature, Network network)
        {
            var data = SignatureEngine.FormatMessageForSigning(hash.Bytes, network);

            return(ECDSAKey.Verify(data, SignatureFormat.FromBytes(signature)));
        }
示例#3
0
 public ECDSASignature Sign(byte[] bytes)
 {
     return(ECDSAKey.Sign(bytes));
 }
示例#4
0
 public bool Verify(byte[] bytes, ECDSASignature signature)
 {
     return(ECDSAKey.Verify(bytes, signature));
 }
示例#5
0
 // TODO put in extension method
 public PublicKey GetPublicKey()
 {
     return(new PublicKey(ECDSAKey.GetPubKey(false)));
 }