Fixed bug in new hex secret key functionality

This commit is contained in:
Dennis Schwerdel 2019-02-16 15:21:02 +01:00
parent 7451353851
commit 4959ca48a1
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ impl Crypto {
fail!("Raw secret key must be exactly {} bytes long", algo.key_len());
}
for i in 0..algo.key_len() {
key[i] = try_fail!(u8::from_str_radix(&password[2*i..2*i+1], 16), "Failed to parse raw secret key: {}");
key[i] = try_fail!(u8::from_str_radix(&password[2*i..=2*i+1], 16), "Failed to parse raw secret key: {}");
}
} else {
let password = if password.starts_with(HASH_PREFIX) {