EvEmu
0.8.4
11 September 2021
|
simple class to handle password hash generation More...
#include "PasswordModule.h"
Static Public Member Functions | |
static bool | GeneratePassHash (const std::string &user, const std::string &pass, std::string &hash) |
Generates a SHA-1 hash from a username and a password. More... | |
static bool | GeneratePassHash (const char *user, size_t userLen, const char *pass, size_t passLen, std::string &hash) |
Generates a SHA-1 hash from a username and a password. More... | |
static bool | GeneratePassHash (const std::vector< uint16 > &user, const std::vector< uint16 > &pass, std::string &hash) |
Generates a SHA-1 hash from a username and a password. More... | |
static bool | GeneratePassHash (const uint16 *user, size_t userLen, const uint16 *pass, size_t passLen, std::string &hash) |
Generates a SHA-1 hash from a username and a password. More... | |
simple class to handle password hash generation
this class mainly acts like a shell for the password hash stuff.
Definition at line 39 of file PasswordModule.h.
|
static |
Generates a SHA-1 hash from a username and a password.
[in] | user | The username. |
[in] | pass | The password. |
[out] | hash | Where to place the resultant SHA-1 hash. |
Definition at line 31 of file PasswordModule.cpp.
Referenced by APIServiceManager::_AuthenticateUserNamePassword(), auth_PasswordModuleTest(), and GeneratePassHash().
|
static |
Generates a SHA-1 hash from a username and a password.
[in] | user | The username. |
[in] | userLen | Length of the username. |
[in] | pass | The password. |
[in] | passLen | Length of the password. |
[out] | hash | Where to place the resultant SHA-1 hash. |
Definition at line 43 of file PasswordModule.cpp.
References GeneratePassHash(), and utf8to16().
|
static |
Generates a SHA-1 hash from a username and a password.
The input username and password must be encoded in UTF-16 and the username must be lowercased and trimmed to give expected results.
[in] | user | The username. |
[in] | pass | The password. |
[out] | hash | Where to place the resultant SHA-1 hash. |
Definition at line 80 of file PasswordModule.cpp.
References GeneratePassHash().
|
static |
Generates a SHA-1 hash from a username and a password.
The input username and password must be encoded in UTF-16 and the username must be lowercased and trimmed to give expected results.
[in] | user | The username. |
[in] | userLen | Length of the username (in UTF-16 characters). |
[in] | pass | The password. |
[in] | passLen | Length of the password (in UTF-16 characters). |
[out] | hash | Where to place the resultant SHA-1 hash. |
Definition at line 92 of file PasswordModule.cpp.
References ShaModule::sha_digest(), SHA_DIGESTSIZE, ShaModule::sha_final(), ShaModule::sha_init(), and ShaModule::sha_update().