package cryptotest
Import Path
crypto/internal/cryptotest (on go.dev)
Dependency Relation
imports 20 packages, and imported by 0 packages
Involved Source Files
aead.go
allocations.go
block.go
blockmode.go
fetchmodule.go
hash.go
implementations.go
stream.go
Package-Level Type Names (total 5)
MakeAEAD returns a cipher.AEAD instance.
Multiple calls to MakeAEAD must return equivalent instances, so for example
the key must be fixed.
func TestAEAD(t *testing.T, mAEAD MakeAEAD)
MakeBlockMode returns a cipher.BlockMode instance.
It expects len(iv) == b.BlockSize().
func TestBlockMode(t *testing.T, block cipher.Block, makeEncrypter, makeDecrypter MakeBlockMode)
MakeStream returns a cipher.Stream instance.
Multiple calls to MakeStream must return equivalent instances,
so for example the key and/or IV must be fixed.
func TestStream(t *testing.T, ms MakeStream)
Package-Level Functions (total 9)
FetchModule fetches the module at the given version and returns the directory
containing its source tree. It skips the test if fetching modules is not
possible in this environment.
SkipTestAllocations skips the test if there are any factors that interfere
with allocation optimizations.
TestAEAD performs a set of tests on cipher.AEAD implementations, checking
the documented requirements of NonceSize, Overhead, Seal and Open.
TestAllImplementations runs the provided test function with each available
implementation of the package registered with crypto/internal/impl. If there
are no alternative implementations for pkg, f is invoked directly once.
TestBlock performs a set of tests on cipher.Block implementations, checking
the documented requirements of BlockSize, Encrypt, and Decrypt.
TestBlockMode performs a set of tests on cipher.BlockMode implementations,
checking the documented requirements of CryptBlocks.
TestHash performs a set of tests on hash.Hash implementations, checking the
documented requirements of Write, Sum, Reset, Size, and BlockSize.
TestStream performs a set of tests on cipher.Stream implementations,
checking the documented requirements of XORKeyStream.
TestStreamFromBlock creates a Stream from a cipher.Block used in a
cipher.BlockMode. It addresses Issue 68377 by checking for a panic when the
BlockMode uses an IV with incorrect length.
For a valid IV, it also runs all TestStream tests on the resulting stream.
The pages are generated with Golds v0.7.3. (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. |