Package net.minecraft.network
Class NetworkEncryptionUtils
java.lang.Object
net.minecraft.network.NetworkEncryptionUtils
public class NetworkEncryptionUtils extends Object
- Mappings:
Namespace Name official aflintermediary net/minecraft/class_3515named net/minecraft/network/NetworkEncryptionUtils
-
Constructor Summary
Constructors Constructor Description NetworkEncryptionUtils() -
Method Summary
Modifier and Type Method Description static CiphercipherFromKey(int opMode, Key key)private static Ciphercrypt(int opMode, String algorithm, Key key)private static byte[]crypt(int opMode, Key key, byte[] data)static byte[]decrypt(Key key, byte[] data)static SecretKeydecryptSecretKey(PrivateKey privateKey, byte[] encryptedSecretKey)static byte[]encrypt(Key key, byte[] data)static SecretKeygenerateKey()static byte[]generateServerId(String baseServerId, PublicKey publicKey, SecretKey secretKey)static KeyPairgenerateServerKeyPair()private static byte[]hash(byte[][] byte2)static PublicKeyreadEncodedPublicKey(byte[] byte2)
-
Constructor Details
-
NetworkEncryptionUtils
public NetworkEncryptionUtils()
-
-
Method Details
-
generateKey
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official aLafl;a()Ljavax/crypto/SecretKey;intermediary method_15239Lnet/minecraft/class_3515;method_15239()Ljavax/crypto/SecretKey;named generateKeyLnet/minecraft/network/NetworkEncryptionUtils;generateKey()Ljavax/crypto/SecretKey;
-
generateServerKeyPair
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official bLafl;b()Ljava/security/KeyPair;intermediary method_15237Lnet/minecraft/class_3515;method_15237()Ljava/security/KeyPair;named generateServerKeyPairLnet/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 aLafl;a(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[Bintermediary method_15240Lnet/minecraft/class_3515;method_15240(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[Bnamed generateServerIdLnet/minecraft/network/NetworkEncryptionUtils;generateServerId(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
-
hash
- Throws:
Exception- Mappings:
Namespace Name Mixin selector official aLafl;a([[B)[Bintermediary method_15236Lnet/minecraft/class_3515;method_15236([[B)[Bnamed hashLnet/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 aLafl;a([B)Ljava/security/PublicKey;intermediary method_15242Lnet/minecraft/class_3515;method_15242([B)Ljava/security/PublicKey;named readEncodedPublicKeyLnet/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 aLafl;a(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;intermediary method_15234Lnet/minecraft/class_3515;method_15234(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;named decryptSecretKeyLnet/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 aLafl;a(Ljava/security/Key;[B)[Bintermediary method_15238Lnet/minecraft/class_3515;method_15238(Ljava/security/Key;[B)[Bnamed encryptLnet/minecraft/network/NetworkEncryptionUtils;encrypt(Ljava/security/Key;[B)[B
-
decrypt
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official bLafl;b(Ljava/security/Key;[B)[Bintermediary method_15243Lnet/minecraft/class_3515;method_15243(Ljava/security/Key;[B)[Bnamed decryptLnet/minecraft/network/NetworkEncryptionUtils;decrypt(Ljava/security/Key;[B)[B
-
crypt
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official aLafl;a(ILjava/security/Key;[B)[Bintermediary method_15244Lnet/minecraft/class_3515;method_15244(ILjava/security/Key;[B)[Bnamed cryptLnet/minecraft/network/NetworkEncryptionUtils;crypt(ILjava/security/Key;[B)[B
-
crypt
- Throws:
Exception- Mappings:
Namespace Name Mixin selector official aLafl;a(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;intermediary method_15241Lnet/minecraft/class_3515;method_15241(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;named cryptLnet/minecraft/network/NetworkEncryptionUtils;crypt(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;
-
cipherFromKey
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official aLafl;a(ILjava/security/Key;)Ljavax/crypto/Cipher;intermediary method_15235Lnet/minecraft/class_3515;method_15235(ILjava/security/Key;)Ljavax/crypto/Cipher;named cipherFromKeyLnet/minecraft/network/NetworkEncryptionUtils;cipherFromKey(ILjava/security/Key;)Ljavax/crypto/Cipher;
-