Here you can find the source of getHash(String Data)
public final static String getHash(String Data)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; public class Main { public final static String getHash(String Data) { try {// w w w. j a v a 2s . c o m MessageDigest sha = MessageDigest.getInstance("SHA-512"); sha.update(Data.getBytes()); byte result[] = sha.digest(); StringBuilder sb = new StringBuilder(); for (byte data : result) { sb.append(Integer.toString((data & 0xff) + 0x100, 16).substring(1)); } return sb.toString(); } catch (Exception e) { e.printStackTrace(); } return null; } }