Documentation
¶
Overview ¶
Package hash provides interfaces for hash functions.
Package sha256 implements the SHA224 and SHA256 hash algorithms as defined in FIPS 180-2.
SHA256 block step. In its own file so that a faster assembly or C version can be substituted easily.
Index ¶
Constants ¶
View Source
const Size = 32
The size of a SHA256 checksum in bytes.
View Source
const Size224 = 28
The size of a SHA224 checksum in bytes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash interface { // Write adds more data to the running hash. // It never returns an error. io.Writer // Sum returns the current hash, without changing the // underlying hash state. Sum() []byte // Reset resets the hash to one with zero bytes written. Reset() //Gives a copy of the digest structure Copy() Hash //Calculates the midstate of a SHA hash Midstate() []byte // Size returns the number of bytes Sum will return. Size() int }
Hash is the common interface implemented by all hash functions.
Click to show internal directories.
Click to hide internal directories.