Module concord_core

Record Class KeyData

java.lang.Object
java.lang.Record
nl.andrewl.concord_core.msg.types.client_setup.KeyData
Record Components:
iv - The initialization vector bytes.
salt - The salt bytes.
publicKey - The public key.
All Implemented Interfaces:
Message

public record KeyData(byte[] iv, byte[] salt, byte[] publicKey) extends Record implements Message
This message is sent as the first message from both the server and the client to establish an end-to-end encryption via a key exchange.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The field for the iv record component.
    private final byte[]
    The field for the publicKey record component.
    private final byte[]
    The field for the salt record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyData(byte[] iv, byte[] salt, byte[] publicKey)
    Creates an instance of a KeyData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    byte[]
    iv()
    Returns the value of the iv record component.
    byte[]
    Returns the value of the publicKey record component.
    byte[]
    Returns the value of the salt record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface nl.andrewl.concord_core.msg.Message

    byteSize, getTypeSerializer
  • Field Details

    • iv

      private final byte[] iv
      The field for the iv record component.
    • salt

      private final byte[] salt
      The field for the salt record component.
    • publicKey

      private final byte[] publicKey
      The field for the publicKey record component.
  • Constructor Details

    • KeyData

      public KeyData(byte[] iv, byte[] salt, byte[] publicKey)
      Creates an instance of a KeyData record class.
      Parameters:
      iv - the value for the iv record component
      salt - the value for the salt record component
      publicKey - the value for the publicKey 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.
    • iv

      public byte[] iv()
      Returns the value of the iv record component.
      Returns:
      the value of the iv record component
    • salt

      public byte[] salt()
      Returns the value of the salt record component.
      Returns:
      the value of the salt record component
    • publicKey

      public byte[] publicKey()
      Returns the value of the publicKey record component.
      Returns:
      the value of the publicKey record component