type Hash(interface)
Hash is the common interface implemented by all hash functions.
Hash implementations in the standard library (e.g. hash/crc32 and
crypto/sha256) implement the encoding.BinaryMarshaler and
encoding.BinaryUnmarshaler interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the data previously written to the hash.
The hash state may contain portions of the input in its original form,
which users are expected to handle for any possible security implications.
Compatibility: Any future changes to hash or crypto packages will endeavor
to maintain compatibility with state encoded using previous versions.
That is, any released versions of the packages should be able to
decode data written with any previously released version,
subject to issues such as security fixes.
See the Go compatibility document for background: https://golang.org/doc/go1compat
(T) BlockSize() int
(T) Reset()
(T) Size() int
(T) Sum(b []byte) []byte
(T) Write(p []byte) (n int, err error)Hash32(interface)Hash64(interface)
T : io.Writer
func crypto.Hash.New() Hash
func crypto/hmac.New(h func() Hash, key []byte) Hash
func crypto/md5.New() Hash
func crypto/sha1.New() Hash
func crypto/sha256.New() Hash
func crypto/sha256.New224() Hash
func crypto/sha512.New() Hash
func crypto/sha512.New384() Hash
func crypto/sha512.New512_224() Hash
func crypto/sha512.New512_256() Hash
func crypto/rsa.DecryptOAEP(hash Hash, random io.Reader, priv *rsa.PrivateKey, ciphertext []byte, label []byte) ([]byte, error)
func crypto/rsa.EncryptOAEP(hash Hash, random io.Reader, pub *rsa.PublicKey, msg []byte, label []byte) ([]byte, error)
The pages are generated with Goldsv0.1.6. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.