Skip to content

Commit 25dd68e

Browse files
committed
Revert "fix range error: 256-> 255"
This reverts commit 31d9a5d.
1 parent 31d9a5d commit 25dd68e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: sha3/shake.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func leftEncode(value uint64) []byte {
8282
}
8383

8484
func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) (ShakeHash, error) {
85-
if len(N) >= 255 || len(S) >= 255 {
86-
return nil, errors.New("crypto/cSHAKE: N and S should less than 255 bytes")
85+
if len(N) >= 256 || len(S) >= 256 {
86+
return nil, errors.New("crypto/cSHAKE: N and S can be at most 255 bytes long")
8787
}
8888

8989
c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}}

0 commit comments

Comments
 (0)