NBitcoin.Crypto.DeterministicECDSA.setPrivateKey C# (CSharp) Method

setPrivateKey() public method

public setPrivateKey ( ECPrivateKeyParameters ecKey ) : void
ecKey Org.BouncyCastle.Crypto.Parameters.ECPrivateKeyParameters
return void
        public void setPrivateKey(ECPrivateKeyParameters ecKey)
        {
            Init(true, ecKey);
        }

Usage Example

Example #1
0
		public ECDSASignature Sign(uint256 hash)
		{
			AssertPrivateKey();
			var signer = new DeterministicECDSA();
			signer.setPrivateKey(PrivateKey);
			var sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes()));
			return sig.MakeCanonical();
		}
All Usage Examples Of NBitcoin.Crypto.DeterministicECDSA::setPrivateKey