简体   繁体   中英

Same MD5 hash value but different input using hash('md5')

I know that there is some case 2 different strings can have same MD5 hash but when I try with PHP it still become 2 different hash. So is there any string that have same MD5 hash in PHP if I use hash('md5', $blablabla) ?

It is not that simple.

Indeed MD5 is considered as weak today and it is possible to find a collision (another input giving the same hash) under a minute.

Regardless that you have to compute the inputs, just guessing won't work. MD5 produces 128 bit output, so with random guessing will find collision with probability 1/(2^128) (almost impossible)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM