From 2dcbc3bd263907a424b68bb3393dfadd8a29f239 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 10 Sep 2024 20:47:35 +0200 Subject: Fixing compile errors from last change --- modules/crypto/c++/hash.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/crypto/c++') diff --git a/modules/crypto/c++/hash.hpp b/modules/crypto/c++/hash.hpp index 8e8ca86..d7cf94d 100644 --- a/modules/crypto/c++/hash.hpp +++ b/modules/crypto/c++/hash.hpp @@ -14,14 +14,14 @@ template<> class hash { public: error_or> apply(const data& input, const data& salt){ - SAW_ASSERT(input.size() > 0u){ + SAW_ASSERT(input.size().get() > 0u){ return make_error("Strings for hashing shouldn't be zero"); } uint32_t t_cost = 2; uint32_t m_cost = 1<<16; uint32_t parallel = 1; const char* salt_c_ptr = nullptr; - if(salt.size() > 0){ + if(salt.size().get() > 0){ salt_c_ptr = &salt.at(0); } data hash; @@ -30,7 +30,7 @@ public: }catch(const std::exception&){ return make_error("Couldn't allocate hash string"); } - int rv = argon2i_hash_raw(t_cost, m_cost, parallel, &input.at(0), input.size(), salt_c_ptr, salt.size(), &hash.at(0), hash.size()); + int rv = argon2i_hash_raw(t_cost, m_cost, parallel, &input.at(0), input.size().get(), salt_c_ptr, salt.size().get(), &hash.at(0), hash.size().get()); if(rv != ARGON2_OK){ return make_error("Failed to hash"); } -- cgit v1.2.3