pub fn decrypt_key<P, S>(path: P, password: S) -> Result<Vec<u8>, KeystoreError>
Expand description
Decrypts an encrypted JSON keystore at the provided path
using the provided password
.
Decryption supports the Scrypt and
PBKDF2 key derivation functions.
ยงExample
use eth_keystore::decrypt_key;
use std::path::Path;
let keypath = Path::new("./keys/my-key");
let private_key = decrypt_key(&keypath, "password_to_keystore")?;