From 9dbbcf002b5cbae3b65a93e406438711bef52e53 Mon Sep 17 00:00:00 2001 From: redwrasse Date: Mon, 12 May 2025 17:20:25 +0000 Subject: 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: b49002b6b2cff0939858553a28e3f255bde397b6 GitHub-Pull-Request: golang/crypto#300 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/609455 Reviewed-by: Daniel McCarney LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui Reviewed-by: Michael Knyszek --- bcrypt/bcrypt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bcrypt/bcrypt.go b/bcrypt/bcrypt.go index dc93118..3e7f8df 100644 --- a/bcrypt/bcrypt.go +++ b/bcrypt/bcrypt.go @@ -50,7 +50,7 @@ func (ih InvalidHashPrefixError) Error() string { type InvalidCostError int func (ic InvalidCostError) Error() string { - return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost) + return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed inclusive range %d..%d", int(ic), MinCost, MaxCost) } const ( -- cgit v1.3