go/src/crypto/internal/fips/sha3/sha3_test.go

// Sum224 returns the SHA3-224 digest of the data.
func Sum224(data []byte) (digest [28]byte) {}

// Sum256 returns the SHA3-256 digest of the data.
func Sum256(data []byte) (digest [32]byte) {}

// Sum384 returns the SHA3-384 digest of the data.
func Sum384(data []byte) (digest [48]byte) {}

// Sum512 returns the SHA3-512 digest of the data.
func Sum512(data []byte) (digest [64]byte) {}

// ShakeSum128 writes an arbitrary-length digest of data into hash.
func ShakeSum128(hash, data []byte) {}

// ShakeSum256 writes an arbitrary-length digest of data into hash.
func ShakeSum256(hash, data []byte) {}

const testString

var testDigests

var testShakes

// decodeHex converts a hex-encoded string into a raw byte string.
func decodeHex(s string) []byte {}

// TestKeccak does a basic test of the non-standardized Keccak hash functions.
func TestKeccak(t *testing.T) {}

func testKeccak(t *testing.T) {}

// TestShakeSum tests that the output of Sum matches the output of Read.
func TestShakeSum(t *testing.T) {}

func testShakeSum(t *testing.T) {}

// TestUnalignedWrite tests that writing data in an arbitrary pattern with
// small input buffers.
func TestUnalignedWrite(t *testing.T) {}

func testUnalignedWrite(t *testing.T) {}

// TestAppend checks that appending works when reallocation is necessary.
func TestAppend(t *testing.T) {}

func testAppend(t *testing.T) {}

// TestAppendNoRealloc tests that appending works when no reallocation is necessary.
func TestAppendNoRealloc(t *testing.T) {}

func testAppendNoRealloc(t *testing.T) {}

// TestSqueezing checks that squeezing the full output a single time produces
// the same output as repeatedly squeezing the instance.
func TestSqueezing(t *testing.T) {}

func testSqueezing(t *testing.T) {}

// sequentialBytes produces a buffer of size consecutive bytes 0x00, 0x01, ..., used for testing.
//
// The alignment of each slice is intentionally randomized to detect alignment
// issues in the implementation. See https://golang.org/issue/37644.
// Ideally, the compiler should fuzz the alignment itself.
// (See https://golang.org/issue/35128.)
func sequentialBytes(size int) []byte {}

func TestReset(t *testing.T) {}

func testReset(t *testing.T) {}

func TestClone(t *testing.T) {}

func testClone(t *testing.T) {}

var sink

func TestAllocations(t *testing.T) {}

func TestCSHAKEAccumulated(t *testing.T) {}

func testCSHAKEAccumulated(t *testing.T, newCShake func(N, S []byte) *SHAKE, rate int64, exp string) {}

func TestCSHAKELargeS(t *testing.T) {}

func testCSHAKELargeS(t *testing.T) {}

func TestMarshalUnmarshal(t *testing.T) {}

// TODO(filippo): move this to crypto/internal/cryptotest.
func testMarshalUnmarshal(t *testing.T, h fips.Hash) {}

// benchmarkHash tests the speed to hash num buffers of buflen each.
func benchmarkHash(b *testing.B, h fips.Hash, size, num int) {}

// benchmarkShake is specialized to the Shake instances, which don't
// require a copy on reading output.
func benchmarkShake(b *testing.B, h *SHAKE, size, num int) {}

func BenchmarkSha3_512_MTU(b *testing.B) {}

func BenchmarkSha3_384_MTU(b *testing.B) {}

func BenchmarkSha3_256_MTU(b *testing.B) {}

func BenchmarkSha3_224_MTU(b *testing.B) {}

func BenchmarkShake128_MTU(b *testing.B)  {}

func BenchmarkShake256_MTU(b *testing.B)  {}

func BenchmarkShake256_16x(b *testing.B)  {}

func BenchmarkShake256_1MiB(b *testing.B) {}

func BenchmarkSha3_512_1MiB(b *testing.B) {}

func Example_sum() {}

func Example_mac() {}

func ExampleNewCShake256() {}