Package net.minecraft.network.encryption
Record Class PlayerPublicKey.PublicKeyData
java.lang.Object
java.lang.Record
net.minecraft.network.encryption.PlayerPublicKey.PublicKeyData
- Record Components:
key-data-
- Enclosing class:
PlayerPublicKey
public static record PlayerPublicKey.PublicKeyData(PublicKey key, PlayerPublicKey data)
extends Record
A record holding a player's RSA public key data.
This should not be manually created. Use
PlayerPublicKey.verifyAndDecode(MinecraftSessionService) to obtain an instance.
- Mappings:
Namespace Name official brv$aintermediary net/minecraft/class_7428$class_7429named net/minecraft/network/encryption/PlayerPublicKey$PublicKeyDataofficial aintermediary comp_747named keyofficial bintermediary comp_748named data
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the SHA1withRSA signature instance used for verifying signatures.data()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.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
PublicKeyData
-
-
Method Details
-
createSignatureInstance
Returns the SHA1withRSA signature instance used for verifying signatures.- Returns:
- the SHA1withRSA signature instance used for verifying signatures
- Throws:
NetworkEncryptionException- when creation fails- See Also:
- API Note:
- The returned signature cannot be used for signing. Use {#link net.minecraft.client.util.ProfileKeys#createSignatureInstance()} to create the signature for signing the data.
- Mappings:
Namespace Name Mixin selector official aLbrv$a;a()Ljava/security/Signature;intermediary method_43557Lnet/minecraft/class_7428$class_7429;method_43557()Ljava/security/Signature;named createSignatureInstanceLnet/minecraft/network/encryption/PlayerPublicKey$PublicKeyData;createSignatureInstance()Ljava/security/Signature;
-
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-