Class NetworkEncryptionUtils

java.lang.Object
net.minecraft.network.encryption.NetworkEncryptionUtils

public class NetworkEncryptionUtils extends Object
Mappings:
Namespace Name
official ain
intermediary net/minecraft/class_3515
named net/minecraft/network/encryption/NetworkEncryptionUtils
  • Field Details

    • AES

      private static final String AES
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a:Ljava/lang/String;
      intermediary field_29830 Lnet/minecraft/class_3515;field_29830:Ljava/lang/String;
      named AES Lnet/minecraft/network/encryption/NetworkEncryptionUtils;AES:Ljava/lang/String;
    • AES_KEY_LENGTH

      private static final int AES_KEY_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lain;b:I
      intermediary field_29831 Lnet/minecraft/class_3515;field_29831:I
      named AES_KEY_LENGTH Lnet/minecraft/network/encryption/NetworkEncryptionUtils;AES_KEY_LENGTH:I
    • RSA

      private static final String RSA
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lain;c:Ljava/lang/String;
      intermediary field_29832 Lnet/minecraft/class_3515;field_29832:Ljava/lang/String;
      named RSA Lnet/minecraft/network/encryption/NetworkEncryptionUtils;RSA:Ljava/lang/String;
    • RSA_KEY_LENGTH

      private static final int RSA_KEY_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lain;d:I
      intermediary field_29833 Lnet/minecraft/class_3515;field_29833:I
      named RSA_KEY_LENGTH Lnet/minecraft/network/encryption/NetworkEncryptionUtils;RSA_KEY_LENGTH:I
    • ISO_8859_1

      private static final String ISO_8859_1
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Lain;e:Ljava/lang/String;
      intermediary field_29834 Lnet/minecraft/class_3515;field_29834:Ljava/lang/String;
      named ISO_8859_1 Lnet/minecraft/network/encryption/NetworkEncryptionUtils;ISO_8859_1:Ljava/lang/String;
    • SHA1

      private static final String SHA1
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Lain;f:Ljava/lang/String;
      intermediary field_29835 Lnet/minecraft/class_3515;field_29835:Ljava/lang/String;
      named SHA1 Lnet/minecraft/network/encryption/NetworkEncryptionUtils;SHA1:Ljava/lang/String;
  • Constructor Details

    • NetworkEncryptionUtils

      public NetworkEncryptionUtils()
  • Method Details

    • generateKey

      public static SecretKey generateKey() throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a()Ljavax/crypto/SecretKey;
      intermediary method_15239 Lnet/minecraft/class_3515;method_15239()Ljavax/crypto/SecretKey;
      named generateKey Lnet/minecraft/network/encryption/NetworkEncryptionUtils;generateKey()Ljavax/crypto/SecretKey;
    • generateServerKeyPair

      public static KeyPair generateServerKeyPair() throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official b Lain;b()Ljava/security/KeyPair;
      intermediary method_15237 Lnet/minecraft/class_3515;method_15237()Ljava/security/KeyPair;
      named generateServerKeyPair Lnet/minecraft/network/encryption/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 Lain;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/encryption/NetworkEncryptionUtils;generateServerId(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
    • hash

      private static byte[] hash(byte[][] bytes) throws Exception
      Throws:
      Exception
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a([[B)[B
      intermediary method_15236 Lnet/minecraft/class_3515;method_15236([[B)[B
      named hash Lnet/minecraft/network/encryption/NetworkEncryptionUtils;hash([[B)[B
    • readEncodedPublicKey

      public static PublicKey readEncodedPublicKey(byte[] bytes) throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a([B)Ljava/security/PublicKey;
      intermediary method_15242 Lnet/minecraft/class_3515;method_15242([B)Ljava/security/PublicKey;
      named readEncodedPublicKey Lnet/minecraft/network/encryption/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 Lain;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/encryption/NetworkEncryptionUtils;decryptSecretKey(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;
    • encrypt

      public static byte[] encrypt(Key key, byte[] data) throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official a Lain;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/encryption/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 Lain;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/encryption/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 Lain;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/encryption/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 Lain;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/encryption/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 Lain;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/encryption/NetworkEncryptionUtils;cipherFromKey(ILjava/security/Key;)Ljavax/crypto/Cipher;