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.