Add -V/--validate command line switch (#31)

* add -V/--validate command line switch

* Return success/failure bool on CLI::stripKey

---------

Co-authored-by: Neo <321592+Neo-Desktop@users.noreply.github.com>
This commit is contained in:
Emma
2023-06-19 20:41:27 +01:00
committed by GitHub
parent bc23fc5233
commit 4b60737bb4
6 changed files with 114 additions and 16 deletions

View File

@@ -76,15 +76,18 @@ using json = nlohmann::json;
namespace fs = std::filesystem;
enum MODE {
MODE_BINK1998 = 0,
MODE_BINK2002 = 1,
MODE_BINK1998_GENERATE = 0,
MODE_BINK2002_GENERATE = 1,
MODE_CONFIRMATION_ID = 2,
MODE_BINK1998_VALIDATE = 3,
MODE_BINK2002_VALIDATE = 4,
};
struct Options {
std::string binkid;
std::string keysFilename;
std::string instid;
std::string keyToCheck;
int channelID;
int numKeys;
bool verbose;
@@ -126,6 +129,7 @@ EC_GROUP *initializeEllipticCurve(
);
// key.cpp
extern char pKeyCharset[];
void unbase24(BYTE *byteSeq, const char *cdKey);
void base24(char *cdKey, BYTE *byteSeq);