Untitled
unknown
c_cpp
9 months ago
836 B
4
Indexable
std::string inputKey; Auth auth("cod_hermano_external"); // productId is set on constructor while (true) { // always prompt the user for the key std::cout << "ENTER KEY: "; std::getline(std::cin, inputKey); auth.setKey(inputKey); // set the entered key if (auth.verify()) { std::cout << "AUTH SUCCESS!" << std::endl; break; // exit loop on successful authentication } else { std::cout << "ERROR: " << auth.error << std::endl; } } if (!auth.isValid) { std::cout << "Authentication failed. Exiting..." << std::endl; system("pause"); return 0; } std::cout << "TIME LEFT: " << auth.fTimeLeft() << std::endl; if (!auth.isLifetime) { std::thread watchdog(processTimeWatchdog, auth.timeLeft); // start time track watchdog watchdog.detach(); }
Editor is loading...
Leave a Comment