package sha3

Import Path
	golang.org/x/crypto/sha3 (on go.dev)

Dependency Relation
	imports 9 packages, and imported by one package

Involved Source Files Package sha3 implements the SHA-3 hash algorithms and the SHAKE extendable output functions defined in FIPS 202. Most of this package is a wrapper around the crypto/sha3 package in the standard library. The only exception is the legacy Keccak hash functions. legacy_hash.go legacy_keccakf.go shake.go
Package-Level Type Names (only one)
/* sort by: | */
ShakeHash defines the interface to hash functions that support arbitrary-length output. When used as a plain [hash.Hash], it produces minimum-length outputs that provide full-strength generic security. BlockSize returns the hash's underlying block size. The Write method must be able to accept any amount of data, but it may operate more efficiently if all writes are a multiple of the block size. Clone returns a copy of the ShakeHash in its current state. ( ShakeHash) Read(p []byte) (n int, err error) Reset resets the Hash to its initial state. Size returns the number of bytes Sum will return. Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state. ( ShakeHash) Write([]byte) (int, error) ShakeHash : github.com/gogo/protobuf/proto.Sizer ShakeHash : github.com/miekg/dns.Writer ShakeHash : hash.Hash ShakeHash : hash.XOF ShakeHash : internal/bisect.Writer ShakeHash : io.Reader ShakeHash : io.ReadWriter ShakeHash : io.Writer func NewCShake128(N, S []byte) ShakeHash func NewCShake256(N, S []byte) ShakeHash func NewShake128() ShakeHash func NewShake256() ShakeHash func ShakeHash.Clone() ShakeHash
Package-Level Functions (total 16)
New224 creates a new SHA3-224 hash. Its generic security strength is 224 bits against preimage attacks, and 112 bits against collision attacks. It is a wrapper for the [sha3.New224] function in the standard library.
New256 creates a new SHA3-256 hash. Its generic security strength is 256 bits against preimage attacks, and 128 bits against collision attacks. It is a wrapper for the [sha3.New256] function in the standard library.
New384 creates a new SHA3-384 hash. Its generic security strength is 384 bits against preimage attacks, and 192 bits against collision attacks. It is a wrapper for the [sha3.New384] function in the standard library.
New512 creates a new SHA3-512 hash. Its generic security strength is 512 bits against preimage attacks, and 256 bits against collision attacks. It is a wrapper for the [sha3.New512] function in the standard library.
NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash, a customizable variant of SHAKE128. N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is desired. S is a customization byte string used for domain separation - two cSHAKE computations on same input with different S yield unrelated outputs. When N and S are both empty, this is equivalent to NewShake128.
NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash, a customizable variant of SHAKE256. N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is desired. S is a customization byte string used for domain separation - two cSHAKE computations on same input with different S yield unrelated outputs. When N and S are both empty, this is equivalent to NewShake256.
NewLegacyKeccak256 creates a new Keccak-256 hash. Only use this function if you require compatibility with an existing cryptosystem that uses non-standard padding. All other users should use New256 instead.
NewLegacyKeccak512 creates a new Keccak-512 hash. Only use this function if you require compatibility with an existing cryptosystem that uses non-standard padding. All other users should use New512 instead.
NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. Its generic security strength is 128 bits against all attacks if at least 32 bytes of its output are used.
NewShake256 creates a new SHAKE256 variable-output-length ShakeHash. Its generic security strength is 256 bits against all attacks if at least 64 bytes of its output are used.
ShakeSum128 writes an arbitrary-length digest of data into hash.
ShakeSum256 writes an arbitrary-length digest of data into hash.
Sum224 returns the SHA3-224 digest of the data. It is a wrapper for the [sha3.Sum224] function in the standard library.
Sum256 returns the SHA3-256 digest of the data. It is a wrapper for the [sha3.Sum256] function in the standard library.
Sum384 returns the SHA3-384 digest of the data. It is a wrapper for the [sha3.Sum384] function in the standard library.
Sum512 returns the SHA3-512 digest of the data. It is a wrapper for the [sha3.Sum512] function in the standard library.