I am making a program which for security and testing reasons, I wish to check the hash of prior to execution to improve security. However I do not want people to have to install hashlib prior to execution, so does python’s inbuilt hash method have any:
- hash collisions (like those in MD5)
- specific restrictions (e.g. ascii only)
- any other significant issues?
Thanks!
>Solution :
Even though pythons hashing algorithm(siphash, under the hood) is considered more secure than something like md5, it’s worth noting that it’s primary purpose is performance, rather than security. For production you may want to choose a hashing algorithm with a smaller chance of colliding.