Here you can find the source of sha512String(String base)
public static byte[] sha512String(String base)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; public class Main { public static byte[] sha512String(String base) { try {//from w ww .ja v a2 s.c o m MessageDigest digest = MessageDigest.getInstance("SHA-512"); byte[] enc = base.getBytes("UTF-8"); byte[] hash = digest.digest(enc); return hash; } catch (Exception ex) { throw new RuntimeException(ex); } } }