changed interface

This commit is contained in:
Christoph Hilchenbach
2019-12-27 16:27:39 +01:00
parent 08b7801c90
commit 1107d7bcb4
10 changed files with 70 additions and 37 deletions

View File

@@ -2,19 +2,18 @@
#include <iostream>
#include <string>
using namespace bcrypt;
int main()
{
std::string password = "top_secret";
std::string hash = BCrypt::generateHash(password);
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;
std::cout << "\"" << password << "\" : " << bcrypt::validatePassword(password,hash) << std::endl;
std::cout << "\"wrong\" : " << bcrypt::validatePassword("wrong",hash) << std::endl;
return 0;
}