pub fn serialize_option_secret_string<S>(
secret: &Option<SecretString>,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,Expand description
Helper function to serialize optional secrets as encrypted base64 for storage.
Uses AAD from EncryptionContext to bind the ciphertext to its storage location.
The EncryptionContext must be set before calling this function.