Package org.graylog.security.certutil
Record Class KeyPair
java.lang.Object
java.lang.Record
org.graylog.security.certutil.KeyPair
public record KeyPair(PrivateKey privateKey, PublicKey publicKey, X509Certificate certificate)
extends Record
-
Constructor Summary
ConstructorDescriptionKeyPair
(PrivateKey privateKey, PublicKey publicKey, X509Certificate certificate) Creates an instance of aKeyPair
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecertificate
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theprivateKey
record component.Returns the value of thepublicKey
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
KeyPair
Creates an instance of aKeyPair
record class.- Parameters:
privateKey
- the value for theprivateKey
record componentpublicKey
- the value for thepublicKey
record componentcertificate
- the value for thecertificate
record component
-
-
Method Details
-
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)
. -
privateKey
Returns the value of theprivateKey
record component.- Returns:
- the value of the
privateKey
record component
-
publicKey
Returns the value of thepublicKey
record component.- Returns:
- the value of the
publicKey
record component
-
certificate
Returns the value of thecertificate
record component.- Returns:
- the value of the
certificate
record component
-