public static String generateFingerprint(X509Certificate cert) throws CertificateEncodingException, NoSuchAlgorithmException, CertificateEncodingException {
  try {
    return generateFingerprint(cert.getEncoded());
  }
 catch (  CertificateEncodingException e) {
    throw e;
  }
catch (  NoSuchAlgorithmException e) {
    throw e;
  }
}

public static String generateFingerprint ( X509Certificate cert ) throws CertificateEncodingException , NoSuchAlgorithmException , CertificateEncodingException { try { return generateFingerprint ( cert . getEncoded ( ) ) ; } catch ( CertificateEncodingException e ) { throw e ; } catch ( NoSuchAlgorithmException e ) { throw e ; } }
gets sha - 1 hash over the given certificate and return a properly formatted figureprint string . this is similar to the thumbnail concept in . net , except java doesn ' t support this as a property by default . this field could be used to uniquely identify a certificate .
