Struct tink_aead::KmsEnvelopeAead
source · pub struct KmsEnvelopeAead { /* private fields */ }
Expand description
KmsEnvelopeAead
represents an instance of Envelope AEAD.
Implementations§
source§impl KmsEnvelopeAead
impl KmsEnvelopeAead
pub fn new(kt: KeyTemplate, remote: Box<dyn Aead>) -> KmsEnvelopeAead
Trait Implementations§
source§impl Aead for KmsEnvelopeAead
impl Aead for KmsEnvelopeAead
source§fn encrypt(&self, pt: &[u8], aad: &[u8]) -> Result<Vec<u8>, TinkError>
fn encrypt(&self, pt: &[u8], aad: &[u8]) -> Result<Vec<u8>, TinkError>
Encrypt plaintext with
additional_data
as additional
authenticated data. The resulting ciphertext allows for checking
authenticity and integrity of additional data additional_data
,
but there are no guarantees wrt. secrecy of that data.source§impl Clone for KmsEnvelopeAead
impl Clone for KmsEnvelopeAead
Manual implementation of Clone
relying on the trait bounds for
primitives to provide .box_clone()
methods.