Here you can find the source of shaHash(String message)
public static String shaHash(String message) throws NoSuchAlgorithmException
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String shaHash(String message) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-512"); byte[] hash = new byte[0]; hash = md.digest(message.getBytes()); StringBuilder sb = new StringBuilder(2 * hash.length); for (byte b : hash) sb.append(String.format("%02x", b & 0xff)); return sb.toString(); }/*from w w w . java2 s . c om*/ }