From 250e4a94a66757a3eace18c388a2bf02928790b5 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 18 Apr 2021 12:35:42 +0200 Subject: [PATCH] Authenticator: pbkd5(): Mark as const --- authenticator.cpp | 2 +- authenticator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authenticator.cpp b/authenticator.cpp index 6a84b60..9a01f71 100644 --- a/authenticator.cpp +++ b/authenticator.cpp @@ -37,7 +37,7 @@ void Authenticator::incFailureCount(std::string ip) fl.lastfail = time(nullptr); } -std::vector Authenticator::pbkdf5(std::string password, const std::vector &salt) +std::vector Authenticator::pbkdf5(std::string password, const std::vector &salt) const { unsigned char hash[32]; const EVP_MD *sha256 = EVP_sha256(); diff --git a/authenticator.h b/authenticator.h index b1a450c..8620964 100644 --- a/authenticator.h +++ b/authenticator.h @@ -18,7 +18,7 @@ class Authenticator UserDao *userDao; bool isBanned(std::string ip); void incFailureCount(std::string ip); - std::vector pbkdf5(std::string password, const std::vector &salt); + std::vector pbkdf5(std::string password, const std::vector &salt) const; public: Authenticator(UserDao &userDao);