Here you can find the source of bigIntToHash(BigInteger keyValue)
private static String bigIntToHash(BigInteger keyValue) throws Exception
//package com.java2s; //License from project: Apache License import java.math.BigInteger; public class Main { private static String bigIntToHash(BigInteger keyValue) throws Exception { String hashKey = keyValue.toString(16); if (hashKey.length() > 32) { throw new Exception("Invalid value."); }// w w w. ja va 2 s . c o m StringBuilder sb = new StringBuilder(); for (int i = 0; i < 32 - hashKey.length(); ++i) { sb.append("0"); } sb.append(hashKey); return sb.toString().toUpperCase(); } }