I am looking for a way to convert MD5 and SHA1 hashes from their binary to hexadecimal representations and vice versa. I want to do this in Perl, but a general explanation is also welcome.
use Digest::MD5 qw(md5 md5_hex md5_base64); $data = "Plaintext"; $digest_bin = md5($data); $digest_hex = md5_hex($data);
How to compare $digest_bin and $digest_hex and make sure that they are hashes of the same $data ?
source share