Package net.minecraft.util
Record Class Crypt.SaltSignaturePair
java.lang.Object
java.lang.Record
net.minecraft.util.Crypt.SaltSignaturePair
- Enclosing class:
Crypt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Crypt.SaltSignaturePairprivate final longThe field for thesaltrecord component.private final byte[]The field for thesignaturerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSaltSignaturePair(long salt, byte[] signature) Creates an instance of aSaltSignaturePairrecord class.SaltSignaturePair(FriendlyByteBuf p_216098_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValid()longsalt()Returns the value of thesaltrecord component.byte[]byte[]Returns the value of thesignaturerecord component.final StringtoString()Returns a string representation of this record class.static voidwrite(FriendlyByteBuf p_216101_, Crypt.SaltSignaturePair p_216102_)
-
Field Details
-
salt
private final long saltThe field for thesaltrecord component. -
signature
private final byte[] signatureThe field for thesignaturerecord component. -
EMPTY
-
-
Constructor Details
-
SaltSignaturePair
-
SaltSignaturePair
public SaltSignaturePair(long salt, byte[] signature) Creates an instance of aSaltSignaturePairrecord class.- Parameters:
salt- the value for thesaltrecord componentsignature- the value for thesignaturerecord component
-
-
Method Details
-
isValid
public boolean isValid() -
write
-
saltAsBytes
public byte[] saltAsBytes() -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
salt
public long salt()Returns the value of thesaltrecord component.- Returns:
- the value of the
saltrecord component
-
signature
public byte[] signature()Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-