pub trait RandomizedEncryptor {
// Required methods
fn encrypt_with_rng_into<'a, R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
msg: &[u8],
storage: &'a mut [u8],
) -> Result<&'a [u8]>;
fn encrypt_with_rng<R: CryptoRng + ?Sized>(
&self,
rng: &mut R,
msg: &[u8],
) -> Result<Vec<u8>>;
}Expand description
Encrypt the message using provided random source
Required Methods§
Sourcefn encrypt_with_rng_into<'a, R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
msg: &[u8],
storage: &'a mut [u8],
) -> Result<&'a [u8]>
fn encrypt_with_rng_into<'a, R: TryCryptoRng + ?Sized>( &self, rng: &mut R, msg: &[u8], storage: &'a mut [u8], ) -> Result<&'a [u8]>
Encrypt the given message into caller-provided storage.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".