sop::ops

Trait Sign

Source
pub trait Sign<'s, S: SOP<'s>, Keys: Load<'s, S>, Sigs: Save> {
    // Required methods
    fn mode(
        self: Box<Self>,
        mode: SignAs,
    ) -> Box<dyn Sign<'s, S, Keys, Sigs> + 's>;
    fn keys(
        self: Box<Self>,
        keys: &Keys,
    ) -> Result<Box<dyn Sign<'s, S, Keys, Sigs> + 's>>;
    fn with_key_password(
        self: Box<Self>,
        password: Password,
    ) -> Result<Box<dyn Sign<'s, S, Keys, Sigs> + 's>>;
    fn data(
        self: Box<Self>,
        data: &mut (dyn Read + Send + Sync),
    ) -> Result<(Micalg, Sigs)>;
}
Expand description

Builder for SOP::sign.

Required Methods§

Source

fn mode(self: Box<Self>, mode: SignAs) -> Box<dyn Sign<'s, S, Keys, Sigs> + 's>

Sets signature mode.

Source

fn keys( self: Box<Self>, keys: &Keys, ) -> Result<Box<dyn Sign<'s, S, Keys, Sigs> + 's>>

Adds the signer keys.

Source

fn with_key_password( self: Box<Self>, password: Password, ) -> Result<Box<dyn Sign<'s, S, Keys, Sigs> + 's>>

Adds a password to unlock the signing keys with.

All supplied passwords will be used to try to unlock all signing keys.

Source

fn data( self: Box<Self>, data: &mut (dyn Read + Send + Sync), ) -> Result<(Micalg, Sigs)>

Signs data.

Implementors§