Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashReader ¶
HashReader hashes all the bytes read from a reader.
Types ¶
type CheckReader ¶
type CheckReader struct {
// contains filtered or unexported fields
}
CheckReader is a reader that checks the content of a reader, and returns an InvalidArg error if the hash mismatches, instead of io.EOF.
func NewCheckReader ¶
NewCheckReader creates a new checking reader. the hash is sha256
func NewSHA256CheckReader ¶
func NewSHA256CheckReader(r io.Reader, h []byte, n int64) *CheckReader
NewSHA256CheckReader creates a new checking reader that checks sha256 hash.
Click to show internal directories.
Click to hide internal directories.