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 - official - byq- intermediary - net/minecraft/class_7427- named - net/minecraft/network/encryption/PlayerKeyPair- official - b- intermediary - comp_741- named - privateKey- official - c- intermediary - comp_742- named - publicKey- official - d- intermediary - comp_743- named - refreshedAfter
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerKeyPair>private final PrivateKeyThe field for theprivateKeyrecord component.private final PlayerPublicKeyThe field for thepublicKeyrecord component.private final InstantThe field for therefreshedAfterrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerKeyPair(PrivateKey privateKey, PlayerPublicKey playerPublicKey, Instant instant) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether the keys are expired and can no longer be used.Returns the value of theprivateKeyrecord component.Returns the value of thepublicKeyrecord component.Returns the value of therefreshedAfterrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
privateKeyThe field for theprivateKeyrecord component.
- 
publicKeyThe field for thepublicKeyrecord component.
- 
refreshedAfterThe field for therefreshedAfterrecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbyq;a:Lcom/mojang/serialization/Codec;- intermediary - field_39049- Lnet/minecraft/class_7427;field_39049:Lcom/mojang/serialization/Codec;- named - CODEC- Lnet/minecraft/network/encryption/PlayerKeyPair;CODEC:Lcom/mojang/serialization/Codec;
 
 
- 
- 
Constructor Details- 
PlayerKeyPair
 
- 
- 
Method Details- 
isExpiredpublic 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 - official - a- Lbyq;a()Z- intermediary - method_43546- Lnet/minecraft/class_7427;method_43546()Z- named - isExpired- Lnet/minecraft/network/encryption/PlayerKeyPair;isExpired()Z
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
privateKeyReturns the value of theprivateKeyrecord component.- Returns:
- the value of the privateKeyrecord component
 
- 
publicKeyReturns the value of thepublicKeyrecord component.- Returns:
- the value of the publicKeyrecord component
 
- 
refreshedAfterReturns the value of therefreshedAfterrecord component.- Returns:
- the value of the refreshedAfterrecord component
 
 
-