Below, you will find the source for a java checksum program. It produces output similar to md5sum and sha1sum.

If you have the default installation for jre-1.4.2 or later, you should have immediate access to the following hash functions which are part of the default SUN provider:

You can install the BC provider from BouncyCastle and the CryptixCrypto provider from Cryptix which will give you access to all the hash functions provided by the SUN provider plus the following:

checksum-1.0.2.jar is a pre-compiled JAR. After downloading the file, please rename it to checksum.jar. You can always determine the version by running java -jar checksum.jar -v. The md5 checksum for this file is dc63f38114b70804b0f43e0b6774ac5c. is a Bourne shell script that makes starting checksum.jar easier especially under cygwin. If you place checksum.jar anywhere other than $HOME/bin, you will need to edit the "checksum_jar=" line near the top of the script. The md5 checksum for this file is 1828d74698f358fb3e8f8274e7487f6d.

checksum-1.0.2.tar.gz is the source. Compile with ant release. The md5 checksum for this file is f68273376552d778fb7357a022962165.