Record Class CertId

java.lang.Object
java.lang.Record
zeroecho.pkix.ocsp.CertId
Record Components:
hashAlgorithm - the digest algorithm used for the name and key hashes
issuerNameHash - the digest of the issuer distinguished name
issuerKeyHash - the digest of the issuer public key
serialNumber - the certificate serial number

public record CertId(AlgorithmIdentifier hashAlgorithm, byte[] issuerNameHash, byte[] issuerKeyHash, BigInteger serialNumber) extends Record
An OCSP CertID (RFC 6960): identifies a certificate by the hash of its issuer's name and key together with the certificate serial number.
  • Constructor Details

    • CertId

      public CertId(AlgorithmIdentifier hashAlgorithm, byte[] issuerNameHash, byte[] issuerKeyHash, BigInteger serialNumber)
      Canonicalizing constructor.
  • Method Details

    • issuerNameHash

      public byte[] issuerNameHash()
      Returns the issuer-name digest without exposing the record's internal array.
      Returns:
      a defensive copy of the issuer-name digest
    • issuerKeyHash

      public byte[] issuerKeyHash()
      Returns the issuer-key digest without exposing the record's internal array.
      Returns:
      a defensive copy of the issuer-key digest
    • equals

      public boolean equals(Object other)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashAlgorithm

      public AlgorithmIdentifier hashAlgorithm()
      Returns the value of the hashAlgorithm record component.
      Returns:
      the value of the hashAlgorithm record component
    • serialNumber

      public BigInteger serialNumber()
      Returns the value of the serialNumber record component.
      Returns:
      the value of the serialNumber record component