Skip to main content

maybe_encrypt_bound

Function maybe_encrypt_bound 

Source
pub fn maybe_encrypt_bound(
    key: Option<&TokenEncryptionKey>,
    value: &str,
    aad: &[u8],
) -> Result<String, AuthError>
Expand description

Attempt to encrypt value with row-identity AAD if a key is available, returning the stored representation. If key is None the value is stored as plaintext.