Skip to main content

maybe_encrypt

Function maybe_encrypt 

Source
pub fn maybe_encrypt(
    key: Option<&TokenEncryptionKey>,
    value: &str,
) -> Result<String, AuthError>
Expand description

Attempt to encrypt value in the legacy unbound format if a key is available. If key is None the value is stored as plaintext. New write paths should use maybe_encrypt_bound.