Record Class NetworkEncryptionUtils.SignatureData

java.lang.Object
java.lang.Record
net.minecraft.network.encryption.NetworkEncryptionUtils.SignatureData
Record Components:
salt -
signature -
Enclosing class:
NetworkEncryptionUtils

public static record NetworkEncryptionUtils.SignatureData(long salt, byte[] signature) extends Record
A record holding a signature of a data and the salt added while signing. Note that the signature might not be actually present.
Mappings:
Namespace Name
official anz$b
intermediary net/minecraft/class_3515$class_7425
named net/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData
official b
intermediary comp_739
named salt
official c
intermediary comp_740
named signature
  • Field Details

    • salt

      private final long salt
      The field for the salt record component.
    • signature

      private final byte[] signature
      The field for the signature record component.
    • NONE

      public static final NetworkEncryptionUtils.SignatureData NONE
      The signature data for data without signatures.
      Mappings:
      Namespace Name Mixin selector
      official a Lanz$b;a:Lanz$b;
      intermediary field_39040 Lnet/minecraft/class_3515$class_7425;field_39040:Lnet/minecraft/class_3515$class_7425;
      named NONE Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;NONE:Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;
  • Constructor Details

    • SignatureData

      public SignatureData(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lanz$b;<init>(Lsf;)V
      intermediary <init> Lnet/minecraft/class_3515$class_7425;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;<init>(Lnet/minecraft/network/PacketByteBuf;)V
    • SignatureData

      public SignatureData(long long2, byte[] byte2)
  • Method Details

    • isSignaturePresent

      public boolean isSignaturePresent()
      Returns whether the signature data has a signature.
      Returns:
      whether the signature data has a signature
      API Note:
      This does not validate the signature itself.
      Mappings:
      Namespace Name Mixin selector
      official a Lanz$b;a()Z
      intermediary method_43528 Lnet/minecraft/class_3515$class_7425;method_43528()Z
      named isSignaturePresent Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;isSignaturePresent()Z
    • write

      public static void write(PacketByteBuf buf, NetworkEncryptionUtils.SignatureData signatureData)
      Mappings:
      Namespace Name Mixin selector
      official a Lanz$b;a(Lsf;Lanz$b;)V
      intermediary method_43529 Lnet/minecraft/class_3515$class_7425;method_43529(Lnet/minecraft/class_2540;Lnet/minecraft/class_3515$class_7425;)V
      named write Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;write(Lnet/minecraft/network/PacketByteBuf;Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;)V
    • getSalt

      public byte[] getSalt()
      Mappings:
      Namespace Name Mixin selector
      official b Lanz$b;b()[B
      intermediary method_43530 Lnet/minecraft/class_3515$class_7425;method_43530()[B
      named getSalt Lnet/minecraft/network/encryption/NetworkEncryptionUtils$SignatureData;getSalt()[B
    • 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 object)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • salt

      public long salt()
      Returns the value of the salt record component.
      Returns:
      the value of the salt record component
    • signature

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