generate a random login key to be used for session validation

This commit is contained in:
Tina_Azure
2023-04-22 23:17:05 +02:00
parent fbef9f0596
commit 4eb6923bce

View File

@ -295,6 +295,14 @@ namespace Utilities {
loggedIn = true; loggedIn = true;
return loggedIn; return loggedIn;
} }
/*
* Generates a hash based on a combination of 2 random salts
*/
std::string generateLoginKeyValue() {
return hashPassword(generateSalt(), generateSalt());
}
/* /*
* Generates a secure cookie * Generates a secure cookie
*/ */