mirror of
https://github.com/allankoechke/Bcrypt.cpp.git
synced 2026-12-01 09:02:45 +00:00
21 lines
452 B
C++
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;
|
|
}
|