pub trait Encrypt<'s, S: SOP<'s>, Certs: Load<'s, S>, Keys: Load<'s, S>> {
// Required methods
fn no_armor(self: Box<Self>) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>;
fn mode(
self: Box<Self>,
mode: EncryptAs
) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>;
fn sign_with_keys(
self: Box<Self>,
keys: &Keys
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>;
fn with_key_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>;
fn with_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>;
fn with_certs(
self: Box<Self>,
certs: &Certs
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>;
fn plaintext<'d>(
self: Box<Self>,
plaintext: &'d mut (dyn Read + Send + Sync)
) -> Result<Box<dyn Ready<Option<SessionKey>> + 'd>>
where 's: 'd;
// Provided methods
fn list_profiles(&self) -> Vec<(String, String)> { ... }
fn profile(
self: Box<Self>,
_profile: &str
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>> { ... }
}
Expand description
Builder for SOP::encrypt
.
Required Methods§
sourcefn no_armor(self: Box<Self>) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>
fn no_armor(self: Box<Self>) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>
Disables armor encoding.
sourcefn mode(
self: Box<Self>,
mode: EncryptAs
) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>
fn mode( self: Box<Self>, mode: EncryptAs ) -> Box<dyn Encrypt<'s, S, Certs, Keys> + 's>
Sets encryption mode.
sourcefn sign_with_keys(
self: Box<Self>,
keys: &Keys
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
fn sign_with_keys( self: Box<Self>, keys: &Keys ) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
Adds the signer keys.
sourcefn with_key_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
fn with_key_password( self: Box<Self>, password: Password ) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
Adds a password to unlock the signing keys with.
All supplied passwords will be used to try to unlock all signing keys.
sourcefn with_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
fn with_password( self: Box<Self>, password: Password ) -> Result<Box<dyn Encrypt<'s, S, Certs, Keys> + 's>>
Encrypts with the given password.
Provided Methods§
sourcefn list_profiles(&self) -> Vec<(String, String)>
fn list_profiles(&self) -> Vec<(String, String)>
Lists profiles for this subcommand.