Package net.minecraft.network.encryption
Record Class PlayerKeyPair
java.lang.Object
java.lang.Record
net.minecraft.network.encryption.PlayerKeyPair
- Record Components:
privateKey
-publicKey
-refreshedAfter
- the time when the keys must be refreshed, otherwise known as expiry time
public record PlayerKeyPair(PrivateKey privateKey, PlayerPublicKey publicKey, Instant refreshedAfter)
extends Record
An RSA key pair for a player.
Users cannot generate the keys themselves; this must be provided from Mojang's authentication server.
- See Also:
- Mappings:
Namespace Name named net/minecraft/network/encryption/PlayerKeyPair
intermediary net/minecraft/class_7427
official cna
named privateKey
intermediary comp_741
official b
named publicKey
intermediary comp_742
official c
named refreshedAfter
intermediary comp_743
official d
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<PlayerKeyPair> private final PrivateKey
The field for theprivateKey
record component.private final PlayerPublicKey
The field for thepublicKey
record component.private final Instant
The field for therefreshedAfter
record component. -
Constructor Summary
ConstructorDescriptionPlayerKeyPair
(PrivateKey privateKey, PlayerPublicKey playerPublicKey, Instant instant) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns whether the keys are expired and can no longer be used.Returns the value of theprivateKey
record component.Returns the value of thepublicKey
record component.Returns the value of therefreshedAfter
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
privateKey
The field for theprivateKey
record component. -
publicKey
The field for thepublicKey
record component. -
refreshedAfter
The field for therefreshedAfter
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/network/encryption/PlayerKeyPair;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_39049
Lnet/minecraft/class_7427;field_39049:Lcom/mojang/serialization/Codec;
official a
Lcna;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
PlayerKeyPair
-
-
Method Details
-
isExpired
public boolean isExpired()Returns whether the keys are expired and can no longer be used.- Returns:
- whether the keys are expired and can no longer be used
- Mappings:
Namespace Name Mixin selector named isExpired
Lnet/minecraft/network/encryption/PlayerKeyPair;isExpired()Z
intermediary method_43546
Lnet/minecraft/class_7427;method_43546()Z
official a
Lcna;a()Z
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
privateKey
Returns the value of theprivateKey
record component.- Returns:
- the value of the
privateKey
record component
-
publicKey
Returns the value of thepublicKey
record component.- Returns:
- the value of the
publicKey
record component
-
refreshedAfter
Returns the value of therefreshedAfter
record component.- Returns:
- the value of the
refreshedAfter
record component
-