Record Class PqcClientCryptoUtil.GeneratedKeyPair

Object
Record
GeneratedKeyPair
Record Components:
publicKey - the generated public key
privateKey - the generated private key
publicKeyBase64 - the Base64-encoded public key
privateKeyBase64 - the Base64-encoded private key
Enclosing class:
PqcClientCryptoUtil

public static record PqcClientCryptoUtil.GeneratedKeyPair(PublicKey publicKey, PrivateKey privateKey, String publicKeyBase64, String privateKeyBase64) extends Record
A record containing both raw key objects (public, private) and their Base64-encoded forms. Useful if you need to store or transmit keys outside a keystore.
Version:
1.0
Author:
  • Constructor Details

    • GeneratedKeyPair

      public GeneratedKeyPair(PublicKey publicKey, PrivateKey privateKey, String publicKeyBase64, String privateKeyBase64)
      Creates an instance of a GeneratedKeyPair record class.
      Parameters:
      publicKey - the value for the publicKey record component
      privateKey - the value for the privateKey record component
      publicKeyBase64 - the value for the publicKeyBase64 record component
      privateKeyBase64 - the value for the privateKeyBase64 record component
  • Method Details

    • toString

      public final 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
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • publicKey

      public PublicKey publicKey()
      Returns the value of the publicKey record component.
      Returns:
      the value of the publicKey record component
    • privateKey

      public PrivateKey privateKey()
      Returns the value of the privateKey record component.
      Returns:
      the value of the privateKey record component
    • publicKeyBase64

      public String publicKeyBase64()
      Returns the value of the publicKeyBase64 record component.
      Returns:
      the value of the publicKeyBase64 record component
    • privateKeyBase64

      public String privateKeyBase64()
      Returns the value of the privateKeyBase64 record component.
      Returns:
      the value of the privateKeyBase64 record component