Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is Python's inbuilt hash method reliable and secure?

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:

  1. hash collisions (like those in MD5)
  2. specific restrictions (e.g. ascii only)
  3. any other significant issues?

Thanks!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading