Fix multiple key issue

This commit is contained in:
TheTank20 2023-07-28 16:50:40 -05:00 committed by GitHub
parent 3134a6f7a3
commit 8ee1acc2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -433,21 +433,20 @@ int CLI::BINK2002Generate() {
}
PIDGEN3::BINK2002::Generate(this->eCurve, this->genPoint, this->genOrder, this->privateKey, pChannelID, pAuthInfo, false, this->pKey);
fmt::print("\n");
bool isValid = PIDGEN3::BINK2002::Verify(this->eCurve, this->genPoint, this->pubPoint, this->pKey);
if (isValid) {
CLI::printKey(this->pKey);
if (i < this->total - 1 || this->options.verbose) {
if (i < this->total - 1 || this->options.verbose) { // check if end of list or verbose
fmt::print("\n");
}
this->count += isValid;
this->count += isValid; // add to count
}
else {
if (this->options.verbose) {
CLI::printKey(this->pKey);
fmt::print(" [Invalid]");
if (i < this->total - 1) {
CLI::printKey(this->pKey); // print the key
fmt::print(" [Invalid]"); // and add " [Invalid]" to the key
if (i < this->total - 1) { // check if end of list
fmt::print("\n");
}
}