31 const std::string
PASSWORD =
" Secret Password ";
35 0x1b, 0xe6, 0xdf, 0x86, 0x42, 0x1d, 0xcf, 0x2c,
36 0xfa, 0x71, 0x90, 0x0f, 0x34, 0x27, 0x75, 0xb0,
37 0x31, 0x98, 0xdc, 0xe5
44 ::printf(
"username='%s' (len=%lu)\n"
45 "password='%s' (len=%lu)\n",
54 ::fprintf( stderr,
"Cannot generate the hash" );
63 ::fprintf( stderr,
"The computed and the reference"
64 " hashes do not match" );
68 ::puts(
"Hash computation OK" );
const std::string PASSWORD
const std::string USERNAME
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.
int auth_PasswordModuleTest(int argc, char *argv[])