mirror of
https://github.com/golang/go.git
synced 2026-06-27 03:11:23 +00:00
crypto: improve panic message when a hash function is unavailable
Change-Id: I6834dda4b1fe5db5710d1020b26104ba6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/745661 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
6de59e2070
commit
2361851aa9
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ func (h Hash) New() hash.Hash {
|
|||
return f()
|
||||
}
|
||||
}
|
||||
panic("crypto: requested hash function #" + strconv.Itoa(int(h)) + " is unavailable")
|
||||
panic("crypto: requested hash function unavailable: " + h.String())
|
||||
}
|
||||
|
||||
// Available reports whether the given hash function is linked into the binary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue