From 25dd68e151297ea6c65cd1d5a13ca5ef5ff471cc Mon Sep 17 00:00:00 2001 From: MingLLuo Date: Mon, 11 Mar 2024 21:51:50 +0800 Subject: [PATCH] Revert "fix range error: 256-> 255" This reverts commit 31d9a5dc3245ed9f5a92fd196d22ec60ba18afc7. --- sha3/shake.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sha3/shake.go b/sha3/shake.go index c520575388..cc1d23df53 100644 --- a/sha3/shake.go +++ b/sha3/shake.go @@ -82,8 +82,8 @@ func leftEncode(value uint64) []byte { } func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) (ShakeHash, error) { - if len(N) >= 255 || len(S) >= 255 { - return nil, errors.New("crypto/cSHAKE: N and S should less than 255 bytes") + if len(N) >= 256 || len(S) >= 256 { + return nil, errors.New("crypto/cSHAKE: N and S can be at most 255 bytes long") } c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}}