Skip to content

Commit

Permalink
input passphrase twice + check
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Jan 27, 2025
1 parent b54a929 commit c372f64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/mmx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,11 @@ int main(int argc, char** argv)
vnx::optional<std::string> passphrase;
if(with_passphrase) {
passphrase = vnx::input_password("Passphrase: ");
const auto check = vnx::input_password("Passphrase (again): ");
if(check != *passphrase) {
vnx::log_error() << "Passphrase mismatch!";
goto failed;
}
}
key.finger_print = get_finger_print(key.seed_value, passphrase);

Expand Down Expand Up @@ -1046,6 +1051,11 @@ int main(int argc, char** argv)
vnx::optional<std::string> passphrase;
if(with_passphrase) {
passphrase = vnx::input_password("Passphrase: ");
const auto check = vnx::input_password("Passphrase (again): ");
if(check != *passphrase) {
vnx::log_error() << "Passphrase mismatch!";
goto failed;
}
}
mmx::account_t config;
config.num_addresses = 0; // use default
Expand Down

0 comments on commit c372f64

Please sign in to comment.