diff options
Diffstat (limited to 'crypto/sha3')
-rw-r--r-- | crypto/sha3/sha3.go | 5 | ||||
-rw-r--r-- | crypto/sha3/sha3_test.go | 11 |
2 files changed, 3 insertions, 13 deletions
diff --git a/crypto/sha3/sha3.go b/crypto/sha3/sha3.go index c86167c0b..b12a35c87 100644 --- a/crypto/sha3/sha3.go +++ b/crypto/sha3/sha3.go @@ -42,9 +42,8 @@ type state struct { storage [maxRate]byte // Specific to SHA-3 and SHAKE. - fixedOutput bool // whether this is a fixed-output-length instance - outputLen int // the default output size in bytes - state spongeDirection // whether the sponge is absorbing or squeezing + outputLen int // the default output size in bytes + state spongeDirection // whether the sponge is absorbing or squeezing } // BlockSize returns the rate of sponge underlying this hash function. diff --git a/crypto/sha3/sha3_test.go b/crypto/sha3/sha3_test.go index c433761a8..0e33676ce 100644 --- a/crypto/sha3/sha3_test.go +++ b/crypto/sha3/sha3_test.go @@ -53,15 +53,6 @@ var testShakes = map[string]func() ShakeHash{ "SHAKE256": NewShake256, } -// decodeHex converts a hex-encoded string into a raw byte string. -func decodeHex(s string) []byte { - b, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return b -} - // structs used to marshal JSON test-cases. type KeccakKats struct { Kats map[string][]struct { @@ -125,7 +116,7 @@ func TestKeccakKats(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) { testUnalignedAndGeneric(t, func(impl string) { buf := sequentialBytes(0x10000) for alg, df := range testDigests { |