'Python string hashing without collision
Is there any approach to implement hashing without any collisions in python 3?
I am using mmh3 provided by mmh3
import mmh3
string = "/hjhfkhdf/jefhfueiow-/eflkjhfeiero-kk&/kerdfujelifjr(0kjlegjfejf/?/jdfkhe"
mmh3.hash128(string)
To avoid collisions and I am implementing Salt (or seed). is that good enough for uniqueness?
import mmh3
string = "/hjhfkhdf/jefhfueiow-/eflkjhfeiero-kk&/kerdfujelifjr(0kjlegjfejf/?/jdfkhe"
mmh3.hash128(string, 12, signed=True)
Purpose:
my string contains special characters and long string, I need to update in DB and index it. I am assuming (May be wrong), query with special characters lead issues. this is the reason I am generating hashing and store in DB. If my assumption is wrong then I can store original value
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
