caddyserver/caddy · error

unrecognized hash algorithm: %s

Error message

unrecognized hash algorithm: %s

What it means

Error "unrecognized hash algorithm: %s" thrown in caddyserver/caddy.

Source

Thrown at modules/caddyhttp/caddyauth/command.go:175

		threads, err := fs.GetUint8("argon2id-threads")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id threads parameter: %w", err)
		}
		keyLen, err := fs.GetUint32("argon2id-keylen")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id keylen parameter: %w", err)
		}

		hash, _ = Argon2idHash{
			time:    time,
			memory:  memory,
			threads: threads,
			keyLen:  keyLen,
		}.Hash(plaintext)

		hashString = string(hash)
	default:
		return caddy.ExitCodeFailedStartup, fmt.Errorf("unrecognized hash algorithm: %s", algorithm)
	}
	if err != nil {
		return caddy.ExitCodeFailedStartup, err
	}

	fmt.Println(hashString)

	return 0, nil
}

View on GitHub (pinned to 50e54ee279)

Solutions

  1. Use a supported hash algorithm such as 'bcrypt' (default) or 'argon2id' with 'caddy hash-password'.

When it happens

Trigger: Thrown at modules/caddyhttp/caddyauth/command.go:175 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15). Data as JSON: /api/errors/f51e8d014cea99fb. Report an issue: GitHub.