No md5sum? Use OpenSSL!

I constantly find myself generating checksums, and for some reason each Operating System likes to implement their open message digest command ( if they provide one at all ). If your system is missing a digest command, you can use the openssl utility to generate one-time hashes. OpenSSL supports the SHA1, MD5 and RIPEMD160 algorithms, and accepts one or more files as arguments:

$ openssl md5 passwd<strong>
MD5(passwd)= eb1e5c787c3d85b9cf214c70c1095934

$ </strong>openssl sha1 passwd<em>
SHA1(passwd)= 1163c343091756010a77f95068aca4c4e360b932

$ openssl rmd160 passwd</em>
RIPEMD160(passwd)= c5c52bd8506740387691c4b0eb606ad0ffe778d6

$ openssl rmd160 passwd passwd /etc/services<em>
RIPEMD160(passwd)= c5c52bd8506740387691c4b0eb606ad0ffe778d6 RIPEMD160(passwd)= c5c52bd8506740387691c4b0eb606ad0ffe778d6 RIPEMD160(/etc/services)= c5c52bd8506740387691c4b0eb606ad0ffe778d6

$ cat passwd | openssl md5</em>

The OpenSSL source code can be downloaded from the main OpenSSL website:

This article was posted by Matty on 2005-01-28 00:13:00 -0400 -0400