Skip to main content

random_token

Function random_token 

Source
pub fn random_token() -> Result<String, AuthError>
Expand description

Generate a 256-bit random secret, hex encoded.

Used for bearer-style secrets that are compared verbatim rather than hashed (introspection key, Subsonic shared secret), so the entropy has to carry the whole security argument.