Package net.minecraft.network
Class NetworkEncryptionUtils
java.lang.Object
net.minecraft.network.NetworkEncryptionUtils
public class NetworkEncryptionUtils extends Object
- Mappings:
Namespace Name official afl
intermediary net/minecraft/class_3515
named net/minecraft/network/NetworkEncryptionUtils
-
Constructor Summary
Constructors Constructor Description NetworkEncryptionUtils()
-
Method Summary
Modifier and Type Method Description static Cipher
cipherFromKey(int opMode, Key key)
private static Cipher
crypt(int opMode, String algorithm, Key key)
private static byte[]
crypt(int opMode, Key key, byte[] data)
static byte[]
decrypt(Key key, byte[] data)
static SecretKey
decryptSecretKey(PrivateKey privateKey, byte[] encryptedSecretKey)
static byte[]
encrypt(Key key, byte[] data)
static SecretKey
generateKey()
static byte[]
generateServerId(String baseServerId, PublicKey publicKey, SecretKey secretKey)
static KeyPair
generateServerKeyPair()
private static byte[]
hash(byte[][] byte2)
static PublicKey
readEncodedPublicKey(byte[] byte2)
-
Constructor Details
-
NetworkEncryptionUtils
public NetworkEncryptionUtils()
-
-
Method Details
-
generateKey
- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a()Ljavax/crypto/SecretKey;
intermediary method_15239
Lnet/minecraft/class_3515;method_15239()Ljavax/crypto/SecretKey;
named generateKey
Lnet/minecraft/network/NetworkEncryptionUtils;generateKey()Ljavax/crypto/SecretKey;
-
generateServerKeyPair
- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official b
Lafl;b()Ljava/security/KeyPair;
intermediary method_15237
Lnet/minecraft/class_3515;method_15237()Ljava/security/KeyPair;
named generateServerKeyPair
Lnet/minecraft/network/NetworkEncryptionUtils;generateServerKeyPair()Ljava/security/KeyPair;
-
generateServerId
public static byte[] generateServerId(String baseServerId, PublicKey publicKey, SecretKey secretKey) throws NetworkEncryptionException- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
intermediary method_15240
Lnet/minecraft/class_3515;method_15240(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
named generateServerId
Lnet/minecraft/network/NetworkEncryptionUtils;generateServerId(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
-
hash
- Throws:
Exception
- Mappings:
Namespace Name Mixin selector official a
Lafl;a([[B)[B
intermediary method_15236
Lnet/minecraft/class_3515;method_15236([[B)[B
named hash
Lnet/minecraft/network/NetworkEncryptionUtils;hash([[B)[B
-
readEncodedPublicKey
@Environment(CLIENT) public static PublicKey readEncodedPublicKey(byte[] byte2) throws NetworkEncryptionException- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a([B)Ljava/security/PublicKey;
intermediary method_15242
Lnet/minecraft/class_3515;method_15242([B)Ljava/security/PublicKey;
named readEncodedPublicKey
Lnet/minecraft/network/NetworkEncryptionUtils;readEncodedPublicKey([B)Ljava/security/PublicKey;
-
decryptSecretKey
public static SecretKey decryptSecretKey(PrivateKey privateKey, byte[] encryptedSecretKey) throws NetworkEncryptionException- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;
intermediary method_15234
Lnet/minecraft/class_3515;method_15234(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;
named decryptSecretKey
Lnet/minecraft/network/NetworkEncryptionUtils;decryptSecretKey(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;
-
encrypt
@Environment(CLIENT) public static byte[] encrypt(Key key, byte[] data) throws NetworkEncryptionException- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(Ljava/security/Key;[B)[B
intermediary method_15238
Lnet/minecraft/class_3515;method_15238(Ljava/security/Key;[B)[B
named encrypt
Lnet/minecraft/network/NetworkEncryptionUtils;encrypt(Ljava/security/Key;[B)[B
-
decrypt
- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official b
Lafl;b(Ljava/security/Key;[B)[B
intermediary method_15243
Lnet/minecraft/class_3515;method_15243(Ljava/security/Key;[B)[B
named decrypt
Lnet/minecraft/network/NetworkEncryptionUtils;decrypt(Ljava/security/Key;[B)[B
-
crypt
- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(ILjava/security/Key;[B)[B
intermediary method_15244
Lnet/minecraft/class_3515;method_15244(ILjava/security/Key;[B)[B
named crypt
Lnet/minecraft/network/NetworkEncryptionUtils;crypt(ILjava/security/Key;[B)[B
-
crypt
- Throws:
Exception
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;
intermediary method_15241
Lnet/minecraft/class_3515;method_15241(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;
named crypt
Lnet/minecraft/network/NetworkEncryptionUtils;crypt(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;
-
cipherFromKey
- Throws:
NetworkEncryptionException
- Mappings:
Namespace Name Mixin selector official a
Lafl;a(ILjava/security/Key;)Ljavax/crypto/Cipher;
intermediary method_15235
Lnet/minecraft/class_3515;method_15235(ILjava/security/Key;)Ljavax/crypto/Cipher;
named cipherFromKey
Lnet/minecraft/network/NetworkEncryptionUtils;cipherFromKey(ILjava/security/Key;)Ljavax/crypto/Cipher;
-