bitpay/bitcore — pull request #379 by ryanxcharles (2014-06-12 01:15:52+00:00)
Title: throw error when using invalid length hash in Address constructor

I have often made the error of using a public key rather than the hash of the
public key when creating an address, leading to invalid addresses. I'm sure I'm
not the only one. This commit follows the principle of "fail early, fail often"
and simply throws an error if you try to insert something other than 20 bytes
long when creating an address, which would be the case when using a public key.
This way that common mistake should be reduced.