sha.go raw

   1  package utxostore
   2  
   3  import "crypto/sha256"
   4  
   5  // newSHA returns a SHA-256 hash state. The package keeps the constructor in
   6  // one place so the double hash is written once.
   7  func newSHA() hashState { return sha256.New() }
   8  
   9  type hashState = interface {
  10  	Write([]byte) (int, error)
  11  	Sum([]byte) []byte
  12  	Reset()
  13  }
  14