Files
Bcrypt.cpp/test/main.cpp
2019-12-27 13:35:51 +01:00

21 lines
452 B
C++

#include "bcrypt.h"
#include <iostream>
#include <string>
using namespace bcrypt;
int main()
{
std::string password = "top_secret";
std::string hash = BCrypt::generateHash(password);
std::cout << "Hash: " << hash << std::endl;
std::cout << "\"" << password << "\" : " << BCrypt::validatePassword(password,hash) << std::endl;
std::cout << "\"wrong\" : " << BCrypt::validatePassword("wrong",hash) << std::endl;
return 0;
}