yarn/mappings/net/minecraft/network/encryption/PlayerPublicKey.mapping

64 lines
3.4 KiB
Plaintext

CLASS net/minecraft/class_7428 net/minecraft/network/encryption/PlayerPublicKey
COMMENT An RSA public key for a player, signed by the Mojang's server.
COMMENT
COMMENT <p>Users cannot generate the keys themselves; this must be provided from Mojang's
COMMENT authentication server.
COMMENT
COMMENT @see net.minecraft.client.util.ProfileKeys
COMMENT @see PlayerKeyPair
FIELD comp_745 Ljava/lang/String;
COMMENT the PEM-formatted X.509 encoded key
FIELD comp_746 Ljava/lang/String;
COMMENT the signature certifying that this key is provided from Mojang's server
FIELD field_39050 CODEC Lcom/mojang/serialization/Codec;
FIELD field_39051 PUBLIC_KEY Ljava/lang/String;
METHOD <init> (Lcom/mojang/datafixers/util/Pair;Ljava/lang/String;)V
ARG 1 expiresAtAndKey
ARG 2 signature
METHOD method_43548 toProperty ()Lcom/mojang/authlib/properties/Property;
COMMENT {@return the public key as an authlib {@code Property}}
METHOD method_43549 fromGameProfile (Lcom/mojang/authlib/GameProfile;)Ljava/util/Optional;
COMMENT {@return the public key extracted from the {@code gameProfile}}
COMMENT
COMMENT @apiNote This can return an {@linkplain java.util.Optional#empty() empty value}
COMMENT if the profile lacks the public key.
ARG 0 gameProfile
METHOD method_43550 verifyAndDecode (Lcom/mojang/authlib/minecraft/MinecraftSessionService;)Lnet/minecraft/class_7428$class_7429;
COMMENT Verifies the public key and decodes it.
COMMENT
COMMENT <p>The checks whether the public key is present, signed with the Mojang's private key,
COMMENT and not expired.
COMMENT
COMMENT @throws InsecurePublicKeyException.MissingException when the key is missing or empty
COMMENT @throws InsecurePublicKeyException.InvalidException when the key is unsigned or expired
COMMENT @throws NetworkEncryptionException when the key is malformed
ARG 1 sessionService
METHOD method_43551 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
METHOD method_43552 parse (Ljava/lang/String;)Ljava/util/Optional;
COMMENT {@return the expiry time and the key content parsed from {@code contents}}
ARG 0 contents
METHOD method_43553 (Ljava/lang/String;Lcom/mojang/datafixers/util/Pair;)Lnet/minecraft/class_7428;
ARG 1 pair
METHOD method_43554 isExpired ()Z
COMMENT {@return whether the key is expired and can no longer be used}
METHOD method_43555 write (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile;
COMMENT Writes the public key to the {@code gameProfile} properties under the
COMMENT {@value PUBLIC_KEY} key.
ARG 1 gameProfile
CLASS class_7429 PublicKeyData
COMMENT A record holding a player's RSA public key data.
COMMENT
COMMENT <p>This should not be manually created. Use
COMMENT {@link PlayerPublicKey#verifyAndDecode(MinecraftSessionService)} to obtain an instance.
METHOD method_43557 createSignatureInstance ()Ljava/security/Signature;
COMMENT {@return the SHA1withRSA signature instance used for verifying signatures}
COMMENT
COMMENT @apiNote The returned signature cannot be used for signing. Use {#link
COMMENT net.minecraft.client.util.ProfileKeys#createSignatureInstance()} to create the
COMMENT signature for signing the data.
COMMENT
COMMENT @throws NetworkEncryptionException when creation fails
COMMENT
COMMENT @see net.minecraft.client.util.ProfileKeys#createSignatureInstance()