package sha3
Import Path
crypto/internal/fips140/sha3 (on go.dev)
Dependency Relation
imports 8 packages, and imported by 5 packages
Involved Source Files
cast.go
hashes.go
keccakf.go
Package sha3 implements the SHA-3 fixed-output-length hash functions and
the SHAKE variable-output-length functions defined by [FIPS 202], as well as
the cSHAKE extendable-output-length functions defined by [SP 800-185].
sha3_amd64.go
shake.go
sha3_amd64.s
Package-Level Type Names (total 2)
(*Digest) AppendBinary(b []byte) ([]byte, error)
BlockSize returns the rate of sponge underlying this hash function.
(*Digest) Clone() *Digest
(*Digest) MarshalBinary() ([]byte, error)
Reset resets the Digest to its initial state.
Size returns the output size of the hash function in bytes.
Sum appends the current hash to b and returns the resulting slice.
It does not change the underlying hash state.
(*Digest) UnmarshalBinary(b []byte) error
Write absorbs more data into the hash's state.
*Digest : crypto/internal/fips140.Hash
*Digest : encoding.BinaryAppender
*Digest : encoding.BinaryMarshaler
*Digest : encoding.BinaryUnmarshaler
*Digest : hash.Hash
*Digest : internal/bisect.Writer
*Digest : io.Writer
func New224() *Digest
func New256() *Digest
func New384() *Digest
func New512() *Digest
func NewLegacyKeccak256() *Digest
func NewLegacyKeccak512() *Digest
func (*Digest).Clone() *Digest
(*SHAKE) AppendBinary(b []byte) ([]byte, error)
(*SHAKE) BlockSize() int
Clone returns a copy of the SHAKE context in its current state.
(*SHAKE) MarshalBinary() ([]byte, error)
(*SHAKE) Read(out []byte) (n int, err error)
Reset resets the hash to initial state.
(*SHAKE) Size() int
Sum appends a portion of output to b and returns the resulting slice. The
output length is selected to provide full-strength generic security: 32 bytes
for SHAKE128 and 64 bytes for SHAKE256. It does not change the underlying
state. It panics if any output has already been read.
(*SHAKE) UnmarshalBinary(b []byte) error
Write absorbs more data into the hash's state.
It panics if any output has already been read.
*SHAKE : crypto/internal/fips140.Hash
*SHAKE : encoding.BinaryAppender
*SHAKE : encoding.BinaryMarshaler
*SHAKE : encoding.BinaryUnmarshaler
*SHAKE : hash.Hash
*SHAKE : internal/bisect.Writer
*SHAKE : io.Reader
*SHAKE : io.ReadWriter
*SHAKE : io.Writer
func NewCShake128(N, S []byte) *SHAKE
func NewCShake256(N, S []byte) *SHAKE
func NewShake128() *SHAKE
func NewShake256() *SHAKE
func (*SHAKE).Clone() *SHAKE
Package-Level Functions (total 10)
New224 returns a new Digest computing the SHA3-224 hash.
New256 returns a new Digest computing the SHA3-256 hash.
New384 returns a new Digest computing the SHA3-384 hash.
New512 returns a new Digest computing the SHA3-512 hash.
NewCShake128 creates a new cSHAKE128 XOF.
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. When N and S are both empty, this is equivalent to NewShake128.
NewCShake256 creates a new cSHAKE256 XOF.
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. When N and S are both empty, this is equivalent to NewShake256.
NewLegacyKeccak256 returns a new Digest computing the legacy, non-standard
Keccak-256 hash.
NewLegacyKeccak512 returns a new Digest computing the legacy, non-standard
Keccak-512 hash.
NewShake128 creates a new SHAKE128 XOF.
NewShake256 creates a new SHAKE256 XOF.
The pages are generated with Golds v0.7.3-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |