Caddy(8)

🌸 NAME 🌸

caddy-hash-password β€” bestie, it hashes a password and writes base64. that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

caddy hash-password [--plaintext ] [--algorithm ] [--bcrypt-cost ]
[--argon2id-time ] [--argon2id-memory ] [--argon2id-threads ]
[--argon2id-keylen ] [flags]

🫢 DESCRIPTION 🫢

okay so this is the convenient way to hash a plaintext password. the resulting hash gets written to stdout as a base64 string. simple as that, no cap. ✨

--plaintext

the password to hash. if you omit it, it gets read from stdin instead. and β€” this is the good part β€” if Caddy is attached to a controlling TTY, your input will not be echoed. so nobody's shoulder-surfing your secrets, we love to see it πŸ™ˆ

--algorithm

picks which hashing algorithm we're using. valid options are:

  • 'argon2id' (recommended for modern security) πŸ‘‘
  • 'bcrypt' (legacy, slower, configurable cost) πŸ’€

πŸ” bcrypt-specific parameters

--bcrypt-cost

sets the bcrypt hashing difficulty. higher values = more security, by making the hash computation slower and way more CPU-intensive. it must be within the valid range [bcrypt.MinCost, bcrypt.MaxCost]. if you omit it, or hand it something invalid, the default cost gets used. periodt.


🧚 Argon2id-specific parameters

--argon2id-time

number of iterations to perform. bumping this up makes hashing slower and more resistant to brute-force attacks. πŸ”₯

--argon2id-memory

amount of memory to use during hashing. larger values increase resistance to GPU/ASIC attacks. the GPUs could never πŸ’…

--argon2id-threads

number of CPU threads to use. increase it for faster hashing on multi-core systems. main character multi-core energy.

--argon2id-keylen

length of the resulting hash in bytes. longer keys increase security but slightly increase storage size. tiny tradeoff, iconic payoff 🌈


πŸ’– OPTIONS πŸ’–

  • -a, --algorithm="bcrypt" β€” name of the hash algorithm
  • --argon2id-keylen=32 β€” length of the resulting Argon2id hash in bytes. longer hashes increase security but slightly increase storage size.
  • --argon2id-memory=47104 β€” memory to use in KiB for Argon2id hashing. larger values increase resistance to GPU/ASIC attacks.
  • --argon2id-threads=1 β€” number of CPU threads to use for Argon2id hashing. increase for faster hashing on multi-core systems.
  • --argon2id-time=1 β€” number of iterations for Argon2id hashing. increasing this makes the hash slower and more resistant to brute-force attacks.
  • --bcrypt-cost=14 β€” bcrypt hashing cost (only used with the 'bcrypt' algorithm)
  • -h, --help[=false] β€” help for hash-password
  • -p, --plaintext="" β€” the plaintext password

πŸ‘€ SEE ALSO πŸ‘€

caddy(8)


πŸ“œ HISTORY πŸ“œ

1-Jan-0001 Auto generated by spf13/cobra


and that's the whole page, bestie πŸŽ€ go forth and hash responsibly.

this lil manual came from spf13/cobra, auto-generated, dated Jan 0001, and it lives in the Caddy(8) family. mwah πŸ’‹

πŸ“¦ where this page comes from