Last active
January 4, 2016 15:49
-
-
Save Trinea/8642934 to your computer and use it in GitHub Desktop.
get md5 and sha1 of file
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
System.out.println(org.apache.commons.codec.digest.DigestUtils.md5Hex(new FileInputStream("E:\\trinea-android-demo.apk"))); | |
System.out.println(org.apache.commons.codec.digest.DigestUtils.sha1Hex(new FileInputStream("E:\\trinea-android-demo.apk"))); | |
System.out.println(org.apache.commons.codec.digest.DigestUtils.sha512Hex(new FileInputStream("E:\\trinea-android-demo.apk"))); | |
download url: http://commons.apache.org/proper/commons-codec/download_codec.cgi | |
api guide: http://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/digest/DigestUtils.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment