// Returns the encoded size and the hash of it (avoids duplicate encoding) func (self *Transaction) SizeHash() (int, cipher.SHA256) { b := self.Serialize() return len(b), cipher.SumDoubleSHA256(b) }
func (self *BlockHeader) Hash() cipher.SHA256 { b1 := encoder.Serialize(*self) return cipher.SumDoubleSHA256(b1) }
// Hashes an entire Transaction struct, including the TransactionHeader func (self *Transaction) Hash() cipher.SHA256 { b := self.Serialize() return cipher.SumDoubleSHA256(b) }