Skip to main content

load_encrypted_key

Function load_encrypted_key 

Source
pub fn load_encrypted_key(
    path: &Path,
    passphrase: &str,
) -> Result<PrivateKey, AnvilError>
Expand description

Loads a passphrase-protected key file with the supplied passphrase.

Use this after receiving IdentityResolution::Encrypted and prompting the user with rpassword (or equivalent) in the CLI layer.

ยงErrors

Returns an error if the passphrase is wrong or the file cannot be read.