Beispiel #1
0
 // FIXME: why do we need version parameter?
 // it shouldn't be called "version" because the it a field with the same name
 public void UpdateSignature(Key key)
 {
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     UpdatePayload();
     signature = new VarString(key.Sign(Hashes.Hash256(payload.GetString())).ToDER());
 }
Beispiel #2
0
        private void UpdatePayload(BitcoinStream stream)
        {
            MemoryStream ms    = new MemoryStream();
            var          seria = new BitcoinStream(ms, true);

            seria.CopyParameters(stream);
            ReadWritePayloadFields(seria);
            payload = new VarString(ms.ToArray());
        }
Beispiel #3
0
		// FIXME: why do we need version parameter? 
		// it shouldn't be called "version" because the it a field with the same name 
		public void UpdateSignature(Key key)
		{
			if (key == null) throw new ArgumentNullException("key");
			UpdatePayload();
			signature = new VarString(key.Sign(Hashes.Hash256(payload.GetString())).ToDER());
		}
Beispiel #4
0
		private void UpdatePayload(BitcoinStream stream)
		{
			MemoryStream ms = new MemoryStream();
			var seria = new BitcoinStream(ms, true);
			seria.CopyParameters(stream);
			ReadWritePayloadFields(seria);
			payload = new VarString(ms.ToArray());
		}
Beispiel #5
0
 public void UpdateSignature(Key key, ProtocolVersion version = ProtocolVersion.PROTOCOL_VERSION)
 {
     UpdatePayload();
     signature = new VarString(key.Sign(Hashes.Hash256(payload.GetString())).ToDER());
 }
Beispiel #6
0
 public void UpdateSignature(Key key, ProtocolVersion version = ProtocolVersion.PROTOCOL_VERSION)
 {
     UpdatePayload();
     signature = new VarString(key.Sign(Hashes.Hash256(payload.GetString())));
 }