Skip to content

Commit

Permalink
Revert "fix range error: 256-> 255"
Browse files Browse the repository at this point in the history
This reverts commit 31d9a5d.
  • Loading branch information
MingLLuo committed Mar 11, 2024
1 parent 31d9a5d commit 25dd68e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sha3/shake.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 25dd68e

Please sign in to comment.