mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-02-24 01:57:07 -05:00
src/ should only contain our code. Move the in-tree dependencies to dep/ This allows us (if necessary) to e.g. exclude that part of the tree from being analyzed by various tools or mark it as external code in IDEs.
20 lines
570 B
C++
20 lines
570 B
C++
#include "bcrypt/BCrypt.hpp"
|
|
#include <iostream>
|
|
|
|
int main(){
|
|
std::string right_password = "right_password";
|
|
std::string wrong_password = "wrong_password";
|
|
|
|
std::cout << "generate hash... " << std::flush;
|
|
std::string hash = BCrypt::generateHash(right_password, 12);
|
|
std::cout << "done." << std::endl;
|
|
|
|
std::cout << "checking right password: " << std::flush
|
|
<< BCrypt::validatePassword(right_password,hash) << std::endl;
|
|
|
|
std::cout << "checking wrong password: " << std::flush
|
|
<< BCrypt::validatePassword(wrong_password,hash) << std::endl;
|
|
|
|
return 0;
|
|
}
|