I have a 32 chars long text which I want to produce a 64-bit hash from. Security is not required, but it would be a huge plus.
My code will run on a embedded device which I can't load extensions. So the solution needs to use SQLite functions only.
If I were programming in C++, I'd be satisfied with something like:
char text[32];
int64 hash = 5381;
for (int i = 0; i < 32; ++i) {
hash = ((hash << 5) + hash) + c;
}
How do I implement that in SQLite?
Aucun commentaire:
Enregistrer un commentaire