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 Details

    • NetworkEncryptionUtils

      public NetworkEncryptionUtils()
  • Method Details

    • generateKey

      @Environment(CLIENT) public static SecretKey generateKey() throws NetworkEncryptionException
      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

      public static KeyPair generateServerKeyPair() throws NetworkEncryptionException
      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

      private static byte[] hash​(byte[][] byte2) throws Exception
      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

      public static byte[] decrypt​(Key key, byte[] data) throws NetworkEncryptionException
      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

      private static byte[] crypt​(int opMode, Key key, byte[] data) throws NetworkEncryptionException
      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

      private static Cipher crypt​(int opMode, String algorithm, Key key) throws Exception
      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

      public static Cipher cipherFromKey​(int opMode, Key key) throws NetworkEncryptionException
      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;