updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
3
support/3rd_party/src/utils/encryption.cpp
vendored
3
support/3rd_party/src/utils/encryption.cpp
vendored
@@ -22,7 +22,6 @@
|
||||
#include "utils/encryption.hpp"
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
|
||||
namespace {
|
||||
using nonce_t =
|
||||
std::array<unsigned char, crypto_aead_xchacha20poly1305_ietf_NPUBBYTES>;
|
||||
@@ -45,6 +44,7 @@ static constexpr const auto nonce_size{sizeof(nonce_t)};
|
||||
} // namespace
|
||||
|
||||
namespace repertory::utils::encryption {
|
||||
#if defined(PROJECT_ENABLE_BOOST)
|
||||
auto decrypt_data(std::string_view data, std::string_view password,
|
||||
std::optional<hash_256_func_t> hasher) -> data_buffer {
|
||||
auto key =
|
||||
@@ -71,6 +71,7 @@ auto encrypt_data(std::string_view data, std::string_view password,
|
||||
|
||||
return buf;
|
||||
}
|
||||
#endif // defined(PROJECT_ENABLE_BOOST)
|
||||
|
||||
auto generate_key(std::string_view encryption_token) -> key_type {
|
||||
crypto_hash_sha256_state state{};
|
||||
|
Reference in New Issue
Block a user