Helper class for taking password input.
Example use:
std::string password;
{
std::string password;
std::getline(std::cin, password);
}
if (password == "1234") { ... }
Warning: This class is not thread-safe. It's possible for one thread to acquire the lock, and a different thread to immediately release it afterwards. It's recommended to limit use of this function to the main thread (or a thread acting as the main thread for input, if applicable). If you really need to use this on several threads, it must be combined with a mutex or similar.