Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 22:15 UTC
bcrypt: wrong cost flag name (#7168)
GreyXor committed
Aug 11, 2025 at 14:46 UTC
4bfc3b95b5f88a1042a5103d8ad3fac3f42bf129
1 file changed
+2
-2
modules/caddyhttp/caddyauth/command.go
+2
-2
@@ -32,7 +32,7 @@ import (
32
func init() {
33
caddycmd.RegisterCommand(caddycmd.Command{
34
Name: "hash-password",
35
- Usage: "[--plaintext <password>] [--algorithm <name>] [--cost <difficulty>]",
35
+ Usage: "[--plaintext <password>] [--algorithm <name>] [--bcrypt-cost <difficulty>]",
36
Short: "Hashes a password and writes base64",
37
Long: `
38
Convenient way to hash a plaintext password. The resulting
@@ -44,7 +44,7 @@ not be echoed.
44
45
--algorithm currently only supports 'bcrypt', and is the default.
46
47
---cost sets the bcrypt hashing difficulty.
47
+--bcrypt-cost sets the bcrypt hashing difficulty.
48
Higher values increase security by making the hash computation slower and more CPU-intensive.
49
If the provided cost is not within the valid range [bcrypt.MinCost, bcrypt.MaxCost],
50
the default value (defaultBcryptCost) will be used instead.