pub trait Decrypt<T: TryFrom<Vec<u8>>>: AsRef<[u8]> {
// Provided method
fn decrypt<P: BoxProvider, AD: AsRef<[u8]>>(
&self,
key: &Key<P>,
ad: AD,
) -> Result<T, DecryptError<P::Error>> { ... }
}Expand description
Trait for decryptable data. Allows the data to be decrypted.
Provided Methods§
Sourcefn decrypt<P: BoxProvider, AD: AsRef<[u8]>>(
&self,
key: &Key<P>,
ad: AD,
) -> Result<T, DecryptError<P::Error>>
fn decrypt<P: BoxProvider, AD: AsRef<[u8]>>( &self, key: &Key<P>, ad: AD, ) -> Result<T, DecryptError<P::Error>>
decrypts raw data and creates a new type T from the plaintext
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.