protected readonly byte[] vch; // used to export the ECDSAKey protected Key(byte[] data, bool isPrivateKey) { vch = data; ECDSAKey = new ECDSAKey(data, isPrivateKey); }
public bool Verify(Hash256 hash, SignatureByte signature, Network network) { var data = SignatureEngine.FormatMessageForSigning(hash.Bytes, network); return(ECDSAKey.Verify(data, SignatureFormat.FromBytes(signature))); }
public ECDSASignature Sign(byte[] bytes) { return(ECDSAKey.Sign(bytes)); }
public bool Verify(byte[] bytes, ECDSASignature signature) { return(ECDSAKey.Verify(bytes, signature)); }
// TODO put in extension method public PublicKey GetPublicKey() { return(new PublicKey(ECDSAKey.GetPubKey(false))); }