Authenticator: pbkd5(): Mark as const

This commit is contained in:
Albert S. 2021-04-18 12:35:42 +02:00
förälder ac56b2f61d
incheckning 250e4a94a6
2 ändrade filer med 2 tillägg och 2 borttagningar

Visa fil

@ -37,7 +37,7 @@ void Authenticator::incFailureCount(std::string ip)
fl.lastfail = time(nullptr); fl.lastfail = time(nullptr);
} }
std::vector<char> Authenticator::pbkdf5(std::string password, const std::vector<char> &salt) std::vector<char> Authenticator::pbkdf5(std::string password, const std::vector<char> &salt) const
{ {
unsigned char hash[32]; unsigned char hash[32];
const EVP_MD *sha256 = EVP_sha256(); const EVP_MD *sha256 = EVP_sha256();

Visa fil

@ -18,7 +18,7 @@ class Authenticator
UserDao *userDao; UserDao *userDao;
bool isBanned(std::string ip); bool isBanned(std::string ip);
void incFailureCount(std::string ip); void incFailureCount(std::string ip);
std::vector<char> pbkdf5(std::string password, const std::vector<char> &salt); std::vector<char> pbkdf5(std::string password, const std::vector<char> &salt) const;
public: public:
Authenticator(UserDao &userDao); Authenticator(UserDao &userDao);