mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐛 xxhash added
This commit is contained in:
parent
8cb4702825
commit
318ebc07bb
2 changed files with 4 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||||
|
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
add_executable(${PROJECT_NAME} main.cpp)
|
add_executable(${PROJECT_NAME} main.cpp include/xxhash.c)
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC third_party)
|
target_include_directories(${PROJECT_NAME} PUBLIC third_party)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <shared_mutex>
|
#include <shared_mutex>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <xxh3.h>
|
#include "xxhash.h"
|
||||||
#include "parallel-hashmap/parallel_hashmap/phmap.h"
|
#include "parallel-hashmap/parallel_hashmap/phmap.h"
|
||||||
#include "user.hpp"
|
#include "user.hpp"
|
||||||
|
|
||||||
|
|
@ -137,7 +137,7 @@ public:
|
||||||
res = (u.password == XXH64(attempt.data(), attempt.size(), 0));
|
res = (u.password == XXH64(attempt.data(), attempt.size(), 0));
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
u.password = std::hash<std::string>{}(new_pass);
|
u.password = XXH64(new_pass.data(), new_pass.size(), 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue