23 lines
461 B
C
23 lines
461 B
C
#include "include/conf.h"
|
|
|
|
#include <string.h>
|
|
|
|
#include "include/switch.h"
|
|
#include "include/hashing.h"
|
|
|
|
uint64_t vs_switch_hash(const char *input) {
|
|
if (!input) {
|
|
return 0;
|
|
}
|
|
|
|
const size_t length = strlen(input);
|
|
return vs_xxhash3(input, length, vs_fnv1a(input, length));
|
|
}
|
|
|
|
uint64_t vs_switch_hashn(const char *input, size_t len) {
|
|
if (!input) {
|
|
return 0;
|
|
}
|
|
|
|
return vs_xxhash3(input, len, vs_fnv1a(input, len));
|
|
}
|