Record Class MutationKeys

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.sync.MutationKeys

public record MutationKeys(byte[] indexKey, byte[] encKey, byte[] macKey, byte[] snapshotMacKey, byte[] patchMacKey) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The field for the encKey record component.
    private static final int
     
    private final byte[]
    The field for the indexKey record component.
    private final byte[]
    The field for the macKey record component.
    private static final byte[]
     
    private final byte[]
    The field for the patchMacKey record component.
    private final byte[]
    The field for the snapshotMacKey record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MutationKeys(byte[] indexKey, byte[] encKey, byte[] macKey, byte[] snapshotMacKey, byte[] patchMacKey)
    Creates an instance of a MutationKeys record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the value of the encKey record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    byte[]
    Returns the value of the indexKey record component.
    byte[]
    Returns the value of the macKey record component.
    of(byte[] key)
     
    byte[]
    Returns the value of the patchMacKey record component.
    byte[]
    Returns the value of the snapshotMacKey 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
  • Field Details

    • indexKey

      private final byte[] indexKey
      The field for the indexKey record component.
    • encKey

      private final byte[] encKey
      The field for the encKey record component.
    • macKey

      private final byte[] macKey
      The field for the macKey record component.
    • snapshotMacKey

      private final byte[] snapshotMacKey
      The field for the snapshotMacKey record component.
    • patchMacKey

      private final byte[] patchMacKey
      The field for the patchMacKey record component.
    • EXPANDED_SIZE

      private static final int EXPANDED_SIZE
      See Also:
    • MUTATION_KEYS

      private static final byte[] MUTATION_KEYS
  • Constructor Details

    • MutationKeys

      public MutationKeys(byte[] indexKey, byte[] encKey, byte[] macKey, byte[] snapshotMacKey, byte[] patchMacKey)
      Creates an instance of a MutationKeys record class.
      Parameters:
      indexKey - the value for the indexKey record component
      encKey - the value for the encKey record component
      macKey - the value for the macKey record component
      snapshotMacKey - the value for the snapshotMacKey record component
      patchMacKey - the value for the patchMacKey record component
  • Method Details

    • of

      public static MutationKeys of(byte[] key)
    • 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.
    • indexKey

      public byte[] indexKey()
      Returns the value of the indexKey record component.
      Returns:
      the value of the indexKey record component
    • encKey

      public byte[] encKey()
      Returns the value of the encKey record component.
      Returns:
      the value of the encKey record component
    • macKey

      public byte[] macKey()
      Returns the value of the macKey record component.
      Returns:
      the value of the macKey record component
    • snapshotMacKey

      public byte[] snapshotMacKey()
      Returns the value of the snapshotMacKey record component.
      Returns:
      the value of the snapshotMacKey record component
    • patchMacKey

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