Created
January 24, 2013 13:20
-
-
Save 4np/4621489 to your computer and use it in GitHub Desktop.
Generate the md5, sha and RMD160 sums for a particular file. Very useful for create new Portfiles for Macports as a portfile validates these particular checksums for downloaded files. Usage: portsums /path/to/file.tgz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hash methods | |
rmd160() { | |
openssl dgst -rmd160 $1 | |
} | |
portsums() { | |
echo 'MD5 : '`md5 $1` | |
echo 'SHA : '`shasum $1` | |
echo 'RMD160 : '`rmd160 $1` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment