net.minecraft.network.encryption

public class NetworkEncryptionUtils

net.minecraft.util.Crypt
net.minecraft.class_3515
net.minecraft.network.encryption.NetworkEncryptionUtils

Field summary

Modifier and TypeField
private static final String
SYMMETRIC_ALGORITHM
field_29830
AES
private static final int
SYMMETRIC_BITS
field_29831
AES_KEY_LENGTH
private static final String
ASYMMETRIC_ALGORITHM
field_29832
RSA
private static final int
ASYMMETRIC_BITS
field_29833
RSA_KEY_LENGTH
private static final String
BYTE_ENCODING
field_29834
ISO_8859_1
private static final String
HASH_ALGORITHM
field_29835
SHA1
public static final String
SIGNING_ALGORITHM
field_39109
SHA256_WITH_RSA
public static final int
SIGNATURE_BYTES
field_40111
SHA256_BITS
private static final String
PEM_RSA_PRIVATE_KEY_HEADER
field_39037
RSA_PRIVATE_KEY_PREFIX
private static final String
PEM_RSA_PRIVATE_KEY_FOOTER
field_39038
RSA_PRIVATE_KEY_SUFFIX
public static final String
RSA_PUBLIC_KEY_HEADER
field_39033
RSA_PUBLIC_KEY_PREFIX
private static final String
RSA_PUBLIC_KEY_FOOTER
field_39039
RSA_PUBLIC_KEY_SUFFIX
public static final String
MIME_LINE_SEPARATOR
field_39034
LINEBREAK
public static final Base64$Encoder
MIME_ENCODER
field_39272
BASE64_ENCODER
public static final com.mojang.serialization.Codec<PublicKey>
PUBLIC_KEY_CODEC
field_39035
RSA_PUBLIC_KEY_CODEC
public static final com.mojang.serialization.Codec<PrivateKey>
PRIVATE_KEY_CODEC
field_39036
RSA_PRIVATE_KEY_CODEC

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static SecretKey
generateSecretKey()
method_15239()
generateSecretKey()
public static KeyPair
generateKeyPair()
method_15237()
generateServerKeyPair()
public static byte[]
digestData(String serverId, PublicKey publicKey, SecretKey sharedKey)
method_15240(String arg0, PublicKey arg1, SecretKey arg2)
computeServerId(String baseServerId, PublicKey publicKey, SecretKey secretKey)
private static byte[]
digestData(byte[]... inputs)
method_15236(byte[]... arg0)
hash(byte[]... bytes)
private static <T extends Key> T
rsaStringToKey(String input, String header, String footer, Crypt$ByteArrayToKeyFunction<T> byteArrayToKey)
method_43520(String arg0, String arg1, String arg2, class_3515$class_7424<T> arg3)
decodePem(String key, String prefix, String suffix, NetworkEncryptionUtils$KeyDecoder<T> decoder)
public static PrivateKey
stringToPemRsaPrivateKey(String rsaString)
method_43519(String arg0)
decodeRsaPrivateKeyPem(String key)
public static PublicKey
stringToRsaPublicKey(String rsaString)
method_43524(String arg0)
decodeRsaPublicKeyPem(String key)
public static String
rsaPublicKeyToString(PublicKey publicKey)
method_43522(PublicKey arg0)
encodeRsaPublicKey(PublicKey key)
public static String
pemRsaPrivateKeyToString(PrivateKey privateKey)
method_43521(PrivateKey arg0)
encodeRsaPrivateKey(PrivateKey key)
private static PrivateKey
byteToPrivateKey(byte[] keyData)
method_43525(byte[] arg0)
decodeEncodedRsaPrivateKey(byte[] key)
public static PublicKey
byteToPublicKey(byte[] keyData)
method_15242(byte[] arg0)
decodeEncodedRsaPublicKey(byte[] key)
public static SecretKey
decryptByteToSecretKey(PrivateKey privateKey, byte[] keyData)
method_15234(PrivateKey arg0, byte[] arg1)
decryptSecretKey(PrivateKey privateKey, byte[] encryptedSecretKey)
public static byte[]
encryptUsingKey(Key key, byte[] input)
method_15238(Key arg0, byte[] arg1)
encrypt(Key key, byte[] data)
public static byte[]
decryptUsingKey(Key key, byte[] input)
method_15243(Key arg0, byte[] arg1)
decrypt(Key key, byte[] data)
private static byte[]
cipherData(int cipherOpMode, Key key, byte[] input)
method_15244(int arg0, Key arg1, byte[] arg2)
crypt(int opMode, Key key, byte[] data)
private static Cipher
setupCipher(int cipherOpMode, String algorithm, Key key)
method_15241(int arg0, String arg1, Key arg2)
createCipher(int opMode, String algorithm, Key key)
public static Cipher
getCipher(int opMode, Key key)
method_15235(int arg0, Key arg1)
cipherFromKey(int opMode, Key key)
private static com.mojang.serialization.DataResult
lambda$static$1(String arg0)
method_43526(String arg0)
method_43526(String key)
private static com.mojang.serialization.DataResult
lambda$static$0(String arg0)
method_43527(String arg0)
method_43527(String key)