KemalIdentity::Passwords::LengthPolicy
Inherits KemalIdentity::Passwords::Policy < Reference < Object
The shipped policy: a length floor, the algorithm's ceiling, and a breach hook.
Two units, deliberately
The minimum is in characters and the maximum in bytes. They measure different
things. The floor is about how much a person chose to type, and counting a two-byte
character as two would punish a passphrase in Greek for being in Greek. The ceiling is
the algorithm's hard limit, which is a byte count, and pretending otherwise is how a
password gets silently truncated (blueprints/0004-hasher-over-length-behaviour.md).
Constants
docs/02-security-model.md: length is the requirement that actually correlates with
strength, so it is the one that ships.
Constructors
Instance methods
Every reason this password is unacceptable. Empty means acceptable.
All of them, not the first one: telling somebody their password is too short, and then after they fix it that it is also breached, is a worse experience than saying both at once.