Skip to main content

encrypt_token

Function encrypt_token 

Source
pub fn encrypt_token(plaintext: &str, secret: &str) -> Result<String, AuthError>
Expand description

Encrypt a plaintext string with a single persistence key.

Returns hexadecimal nonce/ciphertext. Use encrypt_token_with_config to write a managed key version.