mirror of https://github.com/dswd/vpncloud.git
Fixed bug in new hex secret key functionality
This commit is contained in:
parent
d2b6eb84cc
commit
8e678271af
|
@ -107,7 +107,7 @@ impl Crypto {
|
||||||
fail!("Raw secret key must be exactly {} bytes long", algo.key_len());
|
fail!("Raw secret key must be exactly {} bytes long", algo.key_len());
|
||||||
}
|
}
|
||||||
for i in 0..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 {
|
} else {
|
||||||
let password = if password.starts_with(HASH_PREFIX) {
|
let password = if password.starts_with(HASH_PREFIX) {
|
||||||
|
|
Loading…
Reference in New Issue