public static byte[] certHash(X509Certificate cert) throws Exception {
  return certHash(cert.getEncoded());
}

public static byte [ ] certHash ( X509Certificate cert ) throws Exception { return certHash ( cert . getEncoded ( ) ) ; }
calculates a digest of the given certificate .
