Building a CLI App in Rust, Part 2: Key Generation and the Invariant of Sufficient Randomness
A cryptographic key that is too short, predictable, or improperly encoded is worse than no key at all. The generate command must uphold a strict invariant: the output is always a correctly-sized, random, properly-encoded secret.