Package fr.gouv.vitam.security.internal.common.service

# Class ParsedCertificate

java.lang.Object
fr.gouv.vitam.security.internal.common.service.ParsedCertificate

public class ParsedCertificate extends Object
Helper class for certificate parsing X509 certificates.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ParsedCertificate(X509Certificate x509Certificate, byte[] rawCertificate, String certificateHash)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCertificateHash()`
  Get certificateHash
  `byte[]`
  `getRawCertificate()`
  Get rawCertificate
  `X509Certificate`
  `getX509Certificate()`
  Get x509Certificate
  `static ParsedCertificate`
  `parseCertificate(byte[] certificate)`
  Parses a certificate
  `static String`
  `toCertificateHexString(byte[] certificate)`
  Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ParsedCertificate

    public ParsedCertificate(X509Certificate x509Certificate, byte[] rawCertificate, String certificateHash)
    Constructor
    Parameters:
      `x509Certificate` -
      `rawCertificate` -
      `certificateHash` -

- ## Method Details

  - ### getX509Certificate

    public X509Certificate getX509Certificate()
    Get x509Certificate
    Returns:
      x509Certificate

  - ### getRawCertificate

    public byte[] getRawCertificate()
    Get rawCertificate
    Returns:
      rawCertificate

  - ### getCertificateHash

    public String getCertificateHash()
    Get certificateHash
    Returns:
      certificateHash

  - ### parseCertificate

    public static ParsedCertificate parseCertificate(byte[] certificate) throws PersonalCertificateException
    Parses a certificate
    Parameters:
      `certificate` -
    Returns:
      the ParsedCertificate
    Throws:
      `PersonalCertificateException`

  - ### toCertificateHexString

    public static String toCertificateHexString(byte[] certificate)
    Converts a certificate to Hex for logging (Truncated to MAX_CERTIFICATE_LOG_LENGTH)
    Parameters:
      `certificate` -
    Returns: