Record Class MessageSignatureData

java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageSignatureData
Record Components:
data -

public record MessageSignatureData(byte[] data) extends Record
A message signature data that can be verified when given the header.
Mappings:
Namespace Name
official rz
intermediary net/minecraft/class_7469
named net/minecraft/network/message/MessageSignatureData
official b
intermediary comp_925
named data
  • Field Details

    • data

      private final byte[] data
      The field for the data record component.
    • EMPTY

      public static final MessageSignatureData EMPTY
      Mappings:
      Namespace Name Mixin selector
      official a Lrz;a:Lrz;
      intermediary field_39811 Lnet/minecraft/class_7469;field_39811:Lnet/minecraft/class_7469;
      named EMPTY Lnet/minecraft/network/message/MessageSignatureData;EMPTY:Lnet/minecraft/network/message/MessageSignatureData;
  • Constructor Details

    • MessageSignatureData

      public MessageSignatureData(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lrz;<init>(Lqx;)V
      intermediary <init> Lnet/minecraft/class_7469;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/network/message/MessageSignatureData;<init>(Lnet/minecraft/network/PacketByteBuf;)V
    • MessageSignatureData

      public MessageSignatureData(byte[] byte2)
  • Method Details

    • write

      public void write(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lrz;a(Lqx;)V
      intermediary method_44845 Lnet/minecraft/class_7469;method_44845(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/message/MessageSignatureData;write(Lnet/minecraft/network/PacketByteBuf;)V
    • verify

      public boolean verify(SignatureVerifier verifier, MessageHeader header, MessageBody body)
      Returns whether the signature data is verified.
      Parameters:
      verifier - the verifier that is created with the sender's public key
      Returns:
      whether the signature data is verified
      Mappings:
      Namespace Name Mixin selector
      official a Lrz;a(Lamp;Lsh;Lsf;)Z
      intermediary method_44843 Lnet/minecraft/class_7469;method_44843(Lnet/minecraft/class_7500;Lnet/minecraft/class_7614;Lnet/minecraft/class_7608;)Z
      named verify Lnet/minecraft/network/message/MessageSignatureData;verify(Lnet/minecraft/network/encryption/SignatureVerifier;Lnet/minecraft/network/message/MessageHeader;Lnet/minecraft/network/message/MessageBody;)Z
    • verify

      public boolean verify(SignatureVerifier verifier, MessageHeader header, byte[] bodyDigest)
      Returns whether the signature data is verified.
      Parameters:
      verifier - the verifier that is created with the sender's public key
      bodyDigest - the digest of the message body
      Returns:
      whether the signature data is verified
      Mappings:
      Namespace Name Mixin selector
      official a Lrz;a(Lamp;Lsh;[B)Z
      intermediary method_44844 Lnet/minecraft/class_7469;method_44844(Lnet/minecraft/class_7500;Lnet/minecraft/class_7614;[B)Z
      named verify Lnet/minecraft/network/message/MessageSignatureData;verify(Lnet/minecraft/network/encryption/SignatureVerifier;Lnet/minecraft/network/message/MessageHeader;[B)Z
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      official a Lrz;a()Z
      intermediary method_44842 Lnet/minecraft/class_7469;method_44842()Z
      named isEmpty Lnet/minecraft/network/message/MessageSignatureData;isEmpty()Z
    • toByteBuffer

      @Nullable public @Nullable ByteBuffer toByteBuffer()
      Returns the byte buffer containing the signature data, or null if this signature data is empty.
      Returns:
      the byte buffer containing the signature data, or null if this signature data is empty
      Mappings:
      Namespace Name Mixin selector
      official b Lrz;b()Ljava/nio/ByteBuffer;
      intermediary method_44994 Lnet/minecraft/class_7469;method_44994()Ljava/nio/ByteBuffer;
      named toByteBuffer Lnet/minecraft/network/message/MessageSignatureData;toByteBuffer()Ljava/nio/ByteBuffer;
    • equals

      public 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.
    • hashCode

      public 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
    • toString

      public 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
    • data

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