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 official bti
intermediary net/minecraft/class_7428
named net/minecraft/network/encryption/PlayerPublicKey
official b
intermediary comp_767
named data
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerPublicKey>
private final PlayerPublicKey.PublicKeyData
The field for thedata
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondata()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.static PlayerPublicKey
fromKeyData
(PlayerPublicKey.PublicKeyData publicKeyData) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.static PlayerPublicKey
verifyAndDecode
(SignatureVerifier servicesSignatureVerifier, PlayerPublicKey.PublicKeyData publicKeyData) Verifies the public key and decodes it.
-
Field Details
-
data
The field for thedata
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lbti;a:Lcom/mojang/serialization/Codec;
intermediary field_39050
Lnet/minecraft/class_7428;field_39050:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/network/encryption/PlayerPublicKey;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
PlayerPublicKey
-
-
Method Details
-
fromKeyData
public static PlayerPublicKey fromKeyData(PlayerPublicKey.PublicKeyData publicKeyData) throws NetworkEncryptionException - Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lbti;a(Lbti$a;)Lbti;
intermediary method_43698
Lnet/minecraft/class_7428;method_43698(Lnet/minecraft/class_7428$class_7443;)Lnet/minecraft/class_7428;
named fromKeyData
Lnet/minecraft/network/encryption/PlayerPublicKey;fromKeyData(Lnet/minecraft/network/encryption/PlayerPublicKey$PublicKeyData;)Lnet/minecraft/network/encryption/PlayerPublicKey;
-
verifyAndDecode
public static PlayerPublicKey verifyAndDecode(SignatureVerifier servicesSignatureVerifier, PlayerPublicKey.PublicKeyData publicKeyData) throws com.mojang.authlib.minecraft.InsecurePublicKeyException, NetworkEncryptionException 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.
- Throws:
com.mojang.authlib.minecraft.InsecurePublicKeyException.MissingException
- when the key is missing or emptycom.mojang.authlib.minecraft.InsecurePublicKeyException.InvalidException
- when the key is unsigned or expiredNetworkEncryptionException
- when the key is malformedcom.mojang.authlib.minecraft.InsecurePublicKeyException
- Mappings:
Namespace Name Mixin selector official a
Lbti;a(Lalw;Lbti$a;)Lbti;
intermediary method_43550
Lnet/minecraft/class_7428;method_43550(Lnet/minecraft/class_7500;Lnet/minecraft/class_7428$class_7443;)Lnet/minecraft/class_7428;
named verifyAndDecode
Lnet/minecraft/network/encryption/PlayerPublicKey;verifyAndDecode(Lnet/minecraft/network/encryption/SignatureVerifier;Lnet/minecraft/network/encryption/PlayerPublicKey$PublicKeyData;)Lnet/minecraft/network/encryption/PlayerPublicKey;
-
createSignatureInstance
- Mappings:
Namespace Name Mixin selector official a
Lbti;a()Lalw;
intermediary method_43697
Lnet/minecraft/class_7428;method_43697()Lnet/minecraft/class_7500;
named createSignatureInstance
Lnet/minecraft/network/encryption/PlayerPublicKey;createSignatureInstance()Lnet/minecraft/network/encryption/SignatureVerifier;
-
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)
. -
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-