I’m developing a firefox extension and i’d like to know:
- After i obtain a hash value from a string, what data type is that value?
- Can i use comparison operators with them?
So what i would like to do is compare two hash values and see if one is e.g. higher than the other. Just like comparing if 5 >= 4. Is this possible? To treat hash values like integers?
MD5 is one of the most popular hashing algorithms. It gives you a hex-decimal number from a string that can be used for comparison with reasonable safety. For JavaScript you might try crypto-js but you can easily find many other implementations on the net.