Skip to content

Commit 9dbbcf0

Browse files
redwrassecpu
authored andcommitted
bcrypt: update InvalidCostError message to describe cost range inclusive
Change InvalidCostError string to explicitly state cost bounds range as inclusive, rather than using parentheses that might imply an exclusive range. Change-Id: Ie5e7d53ef4217c8560e6a7fe23e3d65ecc24a2a3 GitHub-Last-Rev: b49002b GitHub-Pull-Request: #300 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/609455 Reviewed-by: Daniel McCarney <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 9f6bf84 commit 9dbbcf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bcrypt/bcrypt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (ih InvalidHashPrefixError) Error() string {
5050
type InvalidCostError int
5151

5252
func (ic InvalidCostError) Error() string {
53-
return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost)
53+
return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed inclusive range %d..%d", int(ic), MinCost, MaxCost)
5454
}
5555

5656
const (

0 commit comments

Comments
 (0)