fix link error
Some checks failed
BlockStorage/repertory_mac/pipeline/head There was a failure building this commit
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-08-08 09:40:02 -05:00
parent c38e1ce43b
commit 6968feac7e
2 changed files with 15 additions and 8 deletions

View File

@@ -23,20 +23,16 @@
#define REPERTORY_INCLUDE_RPC_COMMON_HPP_ #define REPERTORY_INCLUDE_RPC_COMMON_HPP_
#include "utils/base64.hpp" #include "utils/base64.hpp"
#include "utils/collection.hpp"
#include "utils/error_utils.hpp" #include "utils/error_utils.hpp"
#include "utils/hash.hpp"
#include "utils/string.hpp" #include "utils/string.hpp"
namespace repertory::rpc { namespace repertory::rpc {
[[nodiscard]] auto create_password_hash(std::string_view password) [[nodiscard]] auto create_password_hash(std::string_view password)
-> std::string { -> std::string;
return utils::collection::to_hex_string(
utils::encryption::create_hash_blake2b_384(password));
}
[[nodiscard]] auto check_authorization(const auto &cfg, [[nodiscard]] inline auto check_authorization(const auto &cfg,
const httplib::Request &req) -> bool { const httplib::Request &req)
-> bool {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
if (cfg.get_api_password().empty() || cfg.get_api_user().empty()) { if (cfg.get_api_password().empty() || cfg.get_api_user().empty()) {

View File

@@ -0,0 +1,11 @@
#include "rpc/common.hpp"
#include "utils/collection.hpp"
#include "utils/hash.hpp"
namespace repertory::rpc {
auto create_password_hash(std::string_view password) -> std::string {
return utils::collection::to_hex_string(
utils::encryption::create_hash_blake2b_384(password));
}
} // namespace repertory::rpc