pub trait Decrypt<'s, S: SOP<'s>, Certs: Load<'s, S>, Keys: Load<'s, S>> {
// Required methods
fn verify_not_before(
self: Box<Self>,
t: SystemTime
) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>;
fn verify_not_after(
self: Box<Self>,
t: SystemTime
) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>;
fn verify_with_certs(
self: Box<Self>,
certs: &Certs
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>;
fn with_session_key(
self: Box<Self>,
sk: SessionKey
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>;
fn with_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>;
fn with_keys(
self: Box<Self>,
key: &Keys
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>;
fn with_key_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>;
fn ciphertext<'d>(
self: Box<Self>,
ciphertext: &'d mut (dyn Read + Send + Sync)
) -> Result<Box<dyn Ready<(Option<SessionKey>, Vec<Verification>)> + 'd>>
where 's: 'd;
}Expand description
Builder for SOP::decrypt.
Required Methods§
sourcefn verify_not_before(
self: Box<Self>,
t: SystemTime
) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>
fn verify_not_before( self: Box<Self>, t: SystemTime ) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>
Makes SOP consider signatures before this date invalid.
sourcefn verify_not_after(
self: Box<Self>,
t: SystemTime
) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>
fn verify_not_after( self: Box<Self>, t: SystemTime ) -> Box<dyn Decrypt<'s, S, Certs, Keys> + 's>
Makes SOP consider signatures after this date invalid.
sourcefn verify_with_certs(
self: Box<Self>,
certs: &Certs
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
fn verify_with_certs( self: Box<Self>, certs: &Certs ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
Adds the verification certs.
sourcefn with_session_key(
self: Box<Self>,
sk: SessionKey
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
fn with_session_key( self: Box<Self>, sk: SessionKey ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
Tries to decrypt with the given session key.
sourcefn with_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
fn with_password( self: Box<Self>, password: Password ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
Tries to decrypt with the given password.
sourcefn with_keys(
self: Box<Self>,
key: &Keys
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
fn with_keys( self: Box<Self>, key: &Keys ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
Adds the decryption keys.
sourcefn with_key_password(
self: Box<Self>,
password: Password
) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
fn with_key_password( self: Box<Self>, password: Password ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>
Adds a password to unlock the decryption keys with.
All supplied passwords will be used to try to unlock all keys.
sourcefn ciphertext<'d>(
self: Box<Self>,
ciphertext: &'d mut (dyn Read + Send + Sync)
) -> Result<Box<dyn Ready<(Option<SessionKey>, Vec<Verification>)> + 'd>>where
's: 'd,
fn ciphertext<'d>( self: Box<Self>, ciphertext: &'d mut (dyn Read + Send + Sync) ) -> Result<Box<dyn Ready<(Option<SessionKey>, Vec<Verification>)> + 'd>>where 's: 'd,
Decrypts ciphertext, returning verification results and
plaintext.