34 lines
529 B
C
34 lines
529 B
C
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <ctype.h>
|
|
|
|
const char* checkbrute_format()
|
|
{
|
|
return "GTA5";
|
|
}
|
|
|
|
const char* checkbrute_version()
|
|
{
|
|
return "0.1";
|
|
}
|
|
|
|
uint64_t checkbrute_hash64(unsigned char* data, size_t size)
|
|
{
|
|
size_t i = 0;
|
|
uint32_t hash = 0;
|
|
while (i != size) {
|
|
hash += tolower(data[i++]);
|
|
hash += hash << 10;
|
|
hash ^= hash >> 6;
|
|
}
|
|
hash += hash << 3;
|
|
hash ^= hash >> 11;
|
|
hash += hash << 15;
|
|
return hash;
|
|
}
|
|
|
|
int checkbrute_hashsz()
|
|
{
|
|
return 4;
|
|
}
|