Package io.skodjob.testframe.security
Record Class CertAndKey
java.lang.Object
java.lang.Record
io.skodjob.testframe.security.CertAndKey
- Record Components:
certificate- certificateprivateKey- key
Record for certificate and key in memory
-
Constructor Summary
ConstructorsConstructorDescriptionCertAndKey(X509Certificate certificate, PrivateKey privateKey) Creates an instance of aCertAndKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecertificaterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns certificateReturns private keyReturns public keyfinal inthashCode()Returns a hash code value for this object.Returns the value of theprivateKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CertAndKey
Creates an instance of aCertAndKeyrecord class.- Parameters:
certificate- the value for thecertificaterecord componentprivateKey- the value for theprivateKeyrecord component
-
-
Method Details
-
getCertificate
Returns certificate- Returns:
- certificate
-
getPublicKey
Returns public key- Returns:
- public key
-
getPrivateKey
Returns private key- Returns:
- private key
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 withObjects::equals(Object,Object). -
certificate
Returns the value of thecertificaterecord component.- Returns:
- the value of the
certificaterecord component
-
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-