Long serialVersionUID = new Long(0L);
try
{
MessageDigest md = MessageDigest.getInstance("SHA");
byte[] hashBytes = md.digest(signature.getBytes());
long hash = 0;
for (int ctr = Math.min(hashBytes.length, 8) - 1; ctr >= 0; ctr--)
{
hash = (hash << 8) | (hashBytes[ctr] & 0xFF);