load_and_decrtypt_key: allow function closures to readf passphrase
This commit is contained in:
parent
60ffa9649c
commit
649c5ee7b1
@ -148,7 +148,7 @@ pub fn encrypt_key_with_passphrase(
|
||||
})
|
||||
}
|
||||
|
||||
pub fn load_and_decrtypt_key(path: &std::path::Path, passphrase: fn() -> Result<Vec<u8>, Error>) -> Result<([u8;32], DateTime<Local>), Error> {
|
||||
pub fn load_and_decrtypt_key(path: &std::path::Path, passphrase: &dyn Fn() -> Result<Vec<u8>, Error>) -> Result<([u8;32], DateTime<Local>), Error> {
|
||||
|
||||
let raw = file_get_contents(&path)?;
|
||||
let data = String::from_utf8(raw)?;
|
||||
|
Loading…
Reference in New Issue
Block a user