# MD5 Hash outputs not produced

Are there any hash outputs not produced by the MD5 hash function? I need to use it as a placeholder for an empty hash while comparing two hashes.

• Beware of magic values in general. If possible, design your programs in such a way that you don't need placeholders. If you use it you could also use the ASCII encoding of "this=placeholder", it's equally unlikely to generate that value as all zero's. Nov 13, 2015 at 18:27

• @MaartenBodewes, since the possible outputs are really a property of the compression function, there are not nearly infinite inputs. The compression function takes 640 bits of input and produces 128 bits of output so for a random function of that size the probability of some output missing is about $2^{-384}$ if my mental math works.
• @otus True enough, I stand corrected. My estimate is off by $2^{-384}$. Sheesh, crypto is a tough place ;) Nov 14, 2015 at 23:24