Source Code : Codec Digest
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Codec Digest
import org.apache.commons.codec.digest.*;
public class DigestUsage{
public static void main(String args[]){
DigestUsage codec = new DigestUsage();
try{
codec.start();
}catch(Exception e){
System.err.println(e);
}
}
public void start(){
String hashData = "Hello World!!";
System.err.println("Hello World!! as MD5 16 element hash: "
+ new String(DigestUtils.md5(hashData)));
System.err.println("Hello World!! as MD5 Hex hash: "
+ DigestUtils.md5Hex(hashData));
System.err.println("Hello World!! as SHA byte array hash: "
+ new String(DigestUtils.sha(hashData)));
System.err.println("Hello World!! as SHA Hex hash: "
+ DigestUtils.shaHex(hashData));
}
}
Thank with us