This commit is contained in:
16
src/util/crypto_util.hpp
Normal file
16
src/util/crypto_util.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace lm {
|
||||
|
||||
class CryptoUtil
|
||||
{
|
||||
public:
|
||||
static std::string sha256Hex(const std::string& data);
|
||||
static std::string randomToken(std::size_t bytes = 32);
|
||||
static std::string hashPassword(const std::string& salt, const std::string& password);
|
||||
static std::string hashPin(const std::string& salt, const std::string& pin);
|
||||
};
|
||||
|
||||
} // namespace lm
|
||||
Reference in New Issue
Block a user