Function serialize_secret_vec

Source
pub fn serialize_secret_vec<S>(
    secret: &SecretVec<u8>,
    serializer: S,
) -> Result<S::Ok, S::Error>
where S: Serializer,
Expand description

Helper function to serialize 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.