I’ve implemented a BloomFilter in python 3.3, and got different results every session. Drilling down this weird behavior got me to the internal hash() function – it returns different hash values for the same string every session. Example: —– opening a new python console —– Why is this happening? Why is this useful? Answer Python uses a random hash seed
Tag: hash
Fast hash for strings
I have a set of ASCII strings, let’s say they are file paths. They could be both short and quite long. I’m looking for an algorithm that could calculate hash of such a strings and this hash will be also a string, but will have a fixed length, like youtube video ids: MD5 seems to be what I need, but
how to hash a “json” nested dictionary identically in Python and JavaScript?
What’s the best way to consistently hash an object/dictionary that’s limited to what JSON can represent, in both JavaScript and Python? What about in many different languages? Of course there are hash functions implemented consistently in many different languages that take a string, but to hash an object you have to convert it to a string representation first. I want
Reversible hash function?
I need a reversible hash function (obviously the input will be much smaller in size than the output) that maps the input to the output in a random-looking way. Basically, I want a way to transform a number like “123” to a larger number like “9874362483910978”, but not in a way that will preserve comparisons, so it must not be