Class NetworkEncryptionUtils

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

public class NetworkEncryptionUtils
extends Object
Mappings:
Namespace Name
official ng
intermediary net/minecraft/class_1691
named net/minecraft/network/NetworkEncryptionUtils
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a:Lorg/apache/logging/log4j/Logger;
      intermediary field_7107 Lnet/minecraft/class_1691;field_7107:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/network/NetworkEncryptionUtils;LOGGER:Lorg/apache/logging/log4j/Logger;
  • Constructor Details

    • NetworkEncryptionUtils

      public NetworkEncryptionUtils()
  • Method Details

    • generateKey

      @Environment(CLIENT) public static SecretKey generateKey()
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a()Ljavax/crypto/SecretKey;
      intermediary method_6531 Lnet/minecraft/class_1691;method_6531()Ljavax/crypto/SecretKey;
      named generateKey Lnet/minecraft/network/NetworkEncryptionUtils;generateKey()Ljavax/crypto/SecretKey;
    • generateServerKeyPair

      public static KeyPair generateServerKeyPair()
      Mappings:
      Namespace Name Mixin selector
      official b Lng;b()Ljava/security/KeyPair;
      intermediary method_6540 Lnet/minecraft/class_1691;method_6540()Ljava/security/KeyPair;
      named generateServerKeyPair Lnet/minecraft/network/NetworkEncryptionUtils;generateServerKeyPair()Ljava/security/KeyPair;
    • generateServerId

      public static byte[] generateServerId​(String baseServerId, PublicKey publicKey, SecretKey secretKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(Ljava/lang/String;Ljava/security/PublicKey;Ljavax/crypto/SecretKey;)[B
      intermediary method_6535 Lnet/minecraft/class_1691;method_6535(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​(String algorithm, byte[][] data)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(Ljava/lang/String;[[B)[B
      intermediary method_6536 Lnet/minecraft/class_1691;method_6536(Ljava/lang/String;[[B)[B
      named hash Lnet/minecraft/network/NetworkEncryptionUtils;hash(Ljava/lang/String;[[B)[B
    • readEncodedPublicKey

      public static PublicKey readEncodedPublicKey​(byte[] byte2)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a([B)Ljava/security/PublicKey;
      intermediary method_6539 Lnet/minecraft/class_1691;method_6539([B)Ljava/security/PublicKey;
      named readEncodedPublicKey Lnet/minecraft/network/NetworkEncryptionUtils;readEncodedPublicKey([B)Ljava/security/PublicKey;
    • decryptSecretKey

      public static SecretKey decryptSecretKey​(PrivateKey privateKey, byte[] encryptedSecretKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(Ljava/security/PrivateKey;[B)Ljavax/crypto/SecretKey;
      intermediary method_6538 Lnet/minecraft/class_1691;method_6538(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)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(Ljava/security/Key;[B)[B
      intermediary method_6537 Lnet/minecraft/class_1691;method_6537(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)
      Mappings:
      Namespace Name Mixin selector
      official b Lng;b(Ljava/security/Key;[B)[B
      intermediary method_6541 Lnet/minecraft/class_1691;method_6541(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)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(ILjava/security/Key;[B)[B
      intermediary method_6534 Lnet/minecraft/class_1691;method_6534(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)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(ILjava/lang/String;Ljava/security/Key;)Ljavax/crypto/Cipher;
      intermediary method_6532 Lnet/minecraft/class_1691;method_6532(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)
      Mappings:
      Namespace Name Mixin selector
      official a Lng;a(ILjava/security/Key;)Ljavax/crypto/Cipher;
      intermediary method_6533 Lnet/minecraft/class_1691;method_6533(ILjava/security/Key;)Ljavax/crypto/Cipher;
      named cipherFromKey Lnet/minecraft/network/NetworkEncryptionUtils;cipherFromKey(ILjava/security/Key;)Ljavax/crypto/Cipher;