Trait LockableSigner

Source
pub trait LockableSigner: Signer {
    // Required methods
    fn is_locked(&self) -> bool;
    fn unlock(&self, password: &str) -> Result<(), Error>;
    fn lock(&self);
    fn change_passphrase(
        &self,
        old: &str,
        new: &str,
        log_n: u8,
    ) -> Result<(), Error>;
    fn upgrade(&self, pass: &str, log_n: u8) -> Result<(), Error>;
}
Expand description

Any Signer that can be locked and unlocked with a passphrase

Required Methods§

Source

fn is_locked(&self) -> bool

Is the signer locked?

Source

fn unlock(&self, password: &str) -> Result<(), Error>

Try to unlock access to the private key

Source

fn lock(&self)

Lock access to the private key

Source

fn change_passphrase( &self, old: &str, new: &str, log_n: u8, ) -> Result<(), Error>

Change the passphrase used for locking access to the private key

Source

fn upgrade(&self, pass: &str, log_n: u8) -> Result<(), Error>

Upgrade the encrypted private key to the latest format

Implementors§