mirror of
https://github.com/allankoechke/Bcrypt.cpp.git
synced 2026-11-30 09:23:05 +00:00
20 lines
428 B
C++
20 lines
428 B
C++
#include "bcrypt.h"
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
|
|
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;
|
|
}
|