signHash() public method

public signHash ( byte hash ) : byte[]
hash byte
return byte[]
示例#1
0
文件: ECKey.cs 项目: crowar/NBitcoin
		public ECDSASignature Sign(uint256 hash)
		{
			AssertPrivateKey();
			var signer = new DeterministicECDSA();
			signer.setPrivateKey(PrivateKey);
			var sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes()));
			return sig.MakeCanonical();
		}
示例#2
0
        public ECDSASignature Sign(uint256 hash, bool useLowR = true)
        {
            AssertPrivateKey();
            var signer = new DeterministicECDSA(useLowR);

            signer.setPrivateKey(PrivateKey);
            var sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes()));

            return(sig.MakeCanonical());
        }
示例#3
0
        public virtual ECDSASignature Sign(byte[] hash)
        {
            AssertPrivateKey();
            var signer = new DeterministicECDSA();

            signer.setPrivateKey(PrivateKey);
            var sig = ECDSASignature.FromDER(signer.signHash(hash));

            return(sig.MakeCanonical());
        }
示例#4
0
        public ECDSASignature Sign(uint256 hash)
        {
            AssertPrivateKey();
            var signer = new DeterministicECDSA();

            signer.setPrivateKey(this.PrivateKey);
            ECDSASignature sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes()));

            return(sig.MakeCanonical());
        }
示例#5
0
 public virtual ECDSASignature Sign(byte[] hash)
 {
     AssertPrivateKey();
     var signer = new DeterministicECDSA();
     signer.setPrivateKey(PrivateKey);
     var sig = ECDSASignature.FromDER(signer.signHash(hash));
     return sig.MakeCanonical();
 }