Trait sop::ops::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§