sop::ops

Trait Decrypt

Source
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§

Source

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.

Source

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.

Source

fn verify_with_certs( self: Box<Self>, certs: &Certs, ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>

Adds the verification certs.

Source

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.

Source

fn with_password( self: Box<Self>, password: Password, ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>

Tries to decrypt with the given password.

Source

fn with_keys( self: Box<Self>, key: &Keys, ) -> Result<Box<dyn Decrypt<'s, S, Certs, Keys> + 's>>

Adds the decryption keys.

Source

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.

Source

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.

Implementors§