Package net.minecraft.network.encryption
Record Class PlayerPublicKey
java.lang.Object
java.lang.Record
net.minecraft.network.encryption.PlayerPublicKey
- Record Components:
- data-
An RSA public key for a player, signed by the Mojang's server.
 
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/PlayerPublicKey- intermediary - net/minecraft/class_7428- official - csm- named - data- intermediary - comp_767- official - d
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerPublicKey> private final PlayerPublicKey.PublicKeyDataThe field for thedatarecord component.static final Durationstatic final Textprivate static final Text
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.static PlayerPublicKeyverifyAndDecode(SignatureVerifier servicesSignatureVerifier, UUID playerUuid, PlayerPublicKey.PublicKeyData publicKeyData) Verifies the public key and decodes it.
- 
Field Details- 
dataThe field for thedatarecord component.
- 
EXPIRED_PUBLIC_KEY_TEXT- Mappings:
- Namespace - Name - Mixin selector - named - EXPIRED_PUBLIC_KEY_TEXT- Lnet/minecraft/network/encryption/PlayerPublicKey;EXPIRED_PUBLIC_KEY_TEXT:Lnet/minecraft/text/Text;- intermediary - field_39954- Lnet/minecraft/class_7428;field_39954:Lnet/minecraft/class_2561;- official - a- Lcsm;a:Lxg;
 
- 
INVALID_PUBLIC_KEY_SIGNATURE_TEXT- Mappings:
- Namespace - Name - Mixin selector - named - INVALID_PUBLIC_KEY_SIGNATURE_TEXT- Lnet/minecraft/network/encryption/PlayerPublicKey;INVALID_PUBLIC_KEY_SIGNATURE_TEXT:Lnet/minecraft/text/Text;- intermediary - field_39956- Lnet/minecraft/class_7428;field_39956:Lnet/minecraft/class_2561;- official - e- Lcsm;e:Lxg;
 
- 
EXPIRATION_GRACE_PERIOD- Mappings:
- Namespace - Name - Mixin selector - named - EXPIRATION_GRACE_PERIOD- Lnet/minecraft/network/encryption/PlayerPublicKey;EXPIRATION_GRACE_PERIOD:Ljava/time/Duration;- intermediary - field_39955- Lnet/minecraft/class_7428;field_39955:Ljava/time/Duration;- official - b- Lcsm;b:Ljava/time/Duration;
 
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/network/encryption/PlayerPublicKey;CODEC:Lcom/mojang/serialization/Codec;- intermediary - field_39050- Lnet/minecraft/class_7428;field_39050:Lcom/mojang/serialization/Codec;- official - c- Lcsm;c:Lcom/mojang/serialization/Codec;
 
 
- 
- 
Constructor Details- 
PlayerPublicKey
 
- 
- 
Method Details- 
verifyAndDecodepublic static PlayerPublicKey verifyAndDecode(SignatureVerifier servicesSignatureVerifier, UUID playerUuid, PlayerPublicKey.PublicKeyData publicKeyData) throws PlayerPublicKey.PublicKeyException Verifies the public key and decodes it.The checks whether the public key is present, signed with the Mojang's private key, and not expired (taking into account the provided grace period). - Throws:
- PlayerPublicKey.PublicKeyException- when the key is expired or malformed
- Mappings:
- Namespace - Name - Mixin selector - named - verifyAndDecode- Lnet/minecraft/network/encryption/PlayerPublicKey;verifyAndDecode(Lnet/minecraft/network/encryption/SignatureVerifier;Ljava/util/UUID;Lnet/minecraft/network/encryption/PlayerPublicKey$PublicKeyData;)Lnet/minecraft/network/encryption/PlayerPublicKey;- intermediary - method_43550- Lnet/minecraft/class_7428;method_43550(Lnet/minecraft/class_7500;Ljava/util/UUID;Lnet/minecraft/class_7428$class_7443;)Lnet/minecraft/class_7428;- official - a- Lcsm;a(Lbao;Ljava/util/UUID;Lcsm$a;)Lcsm;
 
- 
createSignatureInstance- Mappings:
- Namespace - Name - Mixin selector - named - createSignatureInstance- Lnet/minecraft/network/encryption/PlayerPublicKey;createSignatureInstance()Lnet/minecraft/network/encryption/SignatureVerifier;- intermediary - method_43697- Lnet/minecraft/class_7428;method_43697()Lnet/minecraft/class_7500;- official - a- Lcsm;a()Lbao;
 
- 
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).
- 
dataReturns the value of thedatarecord component.- Returns:
- the value of the datarecord component
 
 
-