hash: mention encoding.BinaryAppender in Hash docs

This commit is contained in:
Mateusz Poliwczak 2024-08-07 08:29:14 +02:00
parent e705a2d16e
commit 6fdb6db481
1 changed files with 2 additions and 2 deletions

View File

@ -10,8 +10,8 @@ import "io"
// 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
// [crypto/sha256]) implement the [encoding.BinaryMarshaler], [encoding.BinaryAppender]
// 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,