mirror of
https://github.com/allankoechke/Bcrypt.cpp.git
synced 2026-12-02 09:03:39 +00:00
changed interface
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user