What are the chances that two messages have the same MD5 digest and the same SHA1 digest?

Assuming uniform spread in the range of MD5 and SHA-1 hashes for random strings (which isn’t the case), and assuming we’re only talking about two strings and not talking about a pool of strings (so we avoid birthday-paradox-type complexities): An MD5 hash is 128 bits wide, and SHA-1’s is 160. With the above assumptions, two … Read more

RoR – MD5 generation

You can use Digest::MD5 from the Ruby standard library for this. irb(main):001:0> require ‘digest/md5’ => true irb(main):002:0> Digest::MD5.hexdigest(‘foobar’) => “3858f62230ac3c915f300c664312c63f” And one more thing: MD5 is a hash algorithm. You don’t “encrypt” anything with a hash algorithm.

Different results with Java’s digest versus external utilities

Got it. The Windows file system is behaving differently depending on the architecture of your process. This article explains it all – in particular: But what about 32-bit applications that have the system path hard coded and is running in a 64-bit Windows? How can they find the new SysWOW64 folder without changes in the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)