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 using AES-256-GCM.

Returns a base64-encoded string of nonce || ciphertext.