mirror of
https://github.com/allankoechke/Bcrypt.cpp.git
synced 2026-12-02 17:04:10 +00:00
23 lines
451 B
C++
23 lines
451 B
C++
#ifndef BCRYPT_H
|
|
#define BCRYPT_H
|
|
|
|
#include <string>
|
|
|
|
namespace bcrypt
|
|
{
|
|
|
|
class BCrypt {
|
|
public:
|
|
static std::string generateHash(const std::string & password , unsigned rounds = 10 );
|
|
static bool validatePassword(const std::string & password, const std::string & hash);
|
|
|
|
};
|
|
|
|
|
|
int bcrypt_newhash(const char *pass, int log_rounds, char *hash, size_t hashlen);
|
|
int bcrypt_checkpass(const char *pass, const char *goodhash);
|
|
|
|
}
|
|
|
|
#endif // BCRYPT_H
|