Hash table, Hash

import hashlib# initializing stringstr2hash = "alok"result = hashlib.md5(str2hash.encode())print(result.hexdigest())bad220c335d0c1f53548f6acdb17e265
  1. A given file will always have same hash but we can’t go back from hash to original value
  2. Sometime multiple string having same hash value, which is called hash collision.
  1. Unordered map or dictionary : Creating a look up table in programming language.
  2. Preventing man-in-the-middle attack

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store