public static String calculateCertHexHash(X509Certificate cert) throws Exception {
  return hexDigest(DEFAULT_CERT_HASH_ALGORITHM_ID,cert.getEncoded());
}

public static String calculateCertHexHash ( X509Certificate cert ) throws Exception { return hexDigest ( DEFAULT_CERT_HASH_ALGORITHM_ID , cert . getEncoded ( ) ) ; }
calculates digest of the certificate and encodes it as lowercase hex .
