Update cli.cpp

This commit is contained in:
pottzman 2023-08-10 16:56:05 +10:00 committed by GitHub
parent 4b2ef7ac72
commit 859a21656c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,6 +385,8 @@ int CLI::BINK1998Generate() {
// Specify whether an upgrade version or not // Specify whether an upgrade version or not
bool bUpgrade = false; bool bUpgrade = false;
if (options->upgrade == true)
bUpgrade = true;
for (int i = 0; i < this->total; i++) { for (int i = 0; i < this->total; i++) {
PIDGEN3::BINK1998::Generate(this->eCurve, this->genPoint, this->genOrder, this->privateKey, nRaw, bUpgrade, this->pKey); PIDGEN3::BINK1998::Generate(this->eCurve, this->genPoint, this->genOrder, this->privateKey, nRaw, bUpgrade, this->pKey);
@ -436,6 +438,11 @@ int CLI::BINK2002Generate() {
fmt::print("> AuthInfo: {}\n", pAuthInfo); fmt::print("> AuthInfo: {}\n", pAuthInfo);
} }
// Specify whether an upgrade version or not
bool bUpgrade = false;
if (options->upgrade == true)
bUpgrade = true;
PIDGEN3::BINK2002::Generate(this->eCurve, this->genPoint, this->genOrder, this->privateKey, pChannelID, pAuthInfo, false, this->pKey); PIDGEN3::BINK2002::Generate(this->eCurve, this->genPoint, this->genOrder, this->privateKey, pChannelID, pAuthInfo, false, this->pKey);
bool isValid = PIDGEN3::BINK2002::Verify(this->eCurve, this->genPoint, this->pubPoint, this->pKey); bool isValid = PIDGEN3::BINK2002::Verify(this->eCurve, this->genPoint, this->pubPoint, this->pKey);