@Test public void testCalculateFingerPrint() throws Exception { Certificate certificate = CertificateUtil.decodePEMFormattedCertificate(CERT_IN_PEM); String actualFingerPrint = CertificateUtil.calculateFingerprint(certificate); assertThat(actualFingerPrint, equalTo(SHA_CERT_FINGERPRINT)); }
public static String calculateFingerprint(final Certificate certificate) throws CertificateEncodingException { String sha1Hash = calculateSha1(certificate); return encode(sha1Hash, ':', 2); }
CertificateUtil { public static String calculateFingerprint(final Certificate certificate) throws CertificateEncodingException { String sha1Hash = calculateSha1(certificate); return encode(sha1Hash, ':', 2); } }
CertificateUtil { public static String calculateFingerprint(final Certificate certificate) throws CertificateEncodingException { String sha1Hash = calculateSha1(certificate); return encode(sha1Hash, ':', 2); } private  CertificateUtil(); }
CertificateUtil { public static String calculateFingerprint(final Certificate certificate) throws CertificateEncodingException { String sha1Hash = calculateSha1(certificate); return encode(sha1Hash, ':', 2); } private  CertificateUtil(); static X509Certificate generateCertificate(final PublicKey publicKey,
                                                    final PrivateKey privateKey,
                                                    final String algorithm,
                                                    final int validDays,
                                                    final String commonName,
                                                    final String orgUnit,
                                                    final String organization,
                                                    final String locality,
                                                    final String state,
                                                    final String country); static String serializeCertificateInPEM(final Certificate certificate); static Certificate decodePEMFormattedCertificate(final String pemFormattedCertificate); static String calculateSha1(final Certificate certificate); static String calculateFingerprint(final Certificate certificate); static Map<String, String> getIssuerRdns(final X509Certificate certificate); static Map<String, String> getSubjectRdns(final X509Certificate certificate); }
CertificateUtil { public static String calculateFingerprint(final Certificate certificate) throws CertificateEncodingException { String sha1Hash = calculateSha1(certificate); return encode(sha1Hash, ':', 2); } private  CertificateUtil(); static X509Certificate generateCertificate(final PublicKey publicKey,
                                                    final PrivateKey privateKey,
                                                    final String algorithm,
                                                    final int validDays,
                                                    final String commonName,
                                                    final String orgUnit,
                                                    final String organization,
                                                    final String locality,
                                                    final String state,
                                                    final String country); static String serializeCertificateInPEM(final Certificate certificate); static Certificate decodePEMFormattedCertificate(final String pemFormattedCertificate); static String calculateSha1(final Certificate certificate); static String calculateFingerprint(final Certificate certificate); static Map<String, String> getIssuerRdns(final X509Certificate certificate); static Map<String, String> getSubjectRdns(final X509Certificate certificate);  }