Skip to main content

MIN_TOKEN_LEN

Constant MIN_TOKEN_LEN 

Source
pub const MIN_TOKEN_LEN: usize = 32;
Expand description

Shorter tokens are guessable; config init issues 64 hex characters (token::generate is 32 random bytes in hex), so this floor only ever bites a token typed by hand.

32 is Hermes’s number — its dashboard session-token provider warns below len(token) < 32 — and it is the strictest of the two tools in the house (Pi ships no dashboard and so has no floor to copy). Hermes warns at that length; this refuses, because a dashboard that will not start tells you before the browser does.