Fixed bug in new hex secret key functionality

This commit is contained in:
Dennis Schwerdel 2019-02-16 15:21:02 +01:00
parent d2b6eb84cc
commit 8e678271af
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) {