#include #include #include using namespace std; using namespace bcrypt; int main() { // 用户输入的原始密码 string password = "userPassword123"; // 使用cpp-bcrypt生成盐和哈希 // bcrypt::generate_salt(); // 生成一个随机盐 // string salt = bcrypt::get_salt(); // 使用盐和密码生成哈希 // string hashed_password; // bcrypt::hashpw(password.c_str(), salt.c_str(), hashed_password); // 打印生成的哈希值 // cout << "Generated bcrypt hash: " << hashed_password << endl; return 0; }