Posts

Showing posts from February, 2020

MD5 Hashing in Python

Image
Code Example This hash function accepts a sequence of bytes and returns  128-bit hash value , usually used to check data integrity but has security issues.  There are many hash functions defined in the “ hashlib ” library in python. # What is Hash? Hash is a function that takes a variable-length sequence of bytes as input and converts it to a fixed-length sequence. However, to get your original data(input bytes) back is not easy. For example, x is your input and f is the f is the hashing function, then calculating f(x) is quick and easy but trying to obtain x again is a very time-consuming job.   {'md4', 'sha512', 'sha3_512', 'whirlpool', 'sha1', 'sha3_256', 'sha3_384', 'mdc2', 'ripemd160', 'md5-sha1', 'sha3_224', 'md5', 'shake_128', 'sha512_224', 'shake_256', 'blake2b', 'sha224', 'sha512_256', 'sm3', 'blake2s', 'sha256'