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
import java.security.MessageDigest | |
import java.io.* | |
/** | |
* Inspired in the original https://gist.github.com/marcelmaatkamp/347630/0d2b8a3b4e78c0be1cabf5a70c4784276d628d41 | |
* Determine the MD5 or SHA1Sum of a file: | |
* | |
* println Checksum.getMD5Sum(new File("file.bin")) | |
* println Checksum.getSHA1Sum(new File("file.bin")) | |
* println Checksum.getMD5Sum("Hello world") |