How to generate Hash of any file in java?
How to generate Hash value of any type of file (.doc,.docx,*.pdf, 开发者_运维百科etc...) in java?
There is a related answer posted here Getting a File's MD5 Checksum in Java
You may look into "Real's How To" Here and use your desired hashing algorithm like this
String myHash = "MD5"; // or "SHA-1" or "SHA-256"
MessageDigest complete = MessageDigest.getInstance(myHash);
精彩评论