Skip to main content

mint

Function mint 

Source
pub fn mint(prefix: &str) -> MintedApiKey
Expand description

Mint a new API key: 32 bytes from the OS CSPRNG, formatted as {prefix}_{base64url_nopad(random)}. The returned MintedApiKey::hash is what you store; MintedApiKey::plaintext is shown once and discarded.