Class MojangCrypt
java.lang.Object
net.minestom.server.extras.mojangAuth.MojangCrypt
public final class MojangCrypt
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description MojangCrypt()
-
Method Summary
Modifier and Type Method Description static javax.crypto.SecretKey
decryptByteToSecretKey(java.security.PrivateKey privateKey, byte[] bytes)
static byte[]
decryptUsingKey(java.security.Key key, byte[] bytes)
static byte[]
digestData(java.lang.String data, java.security.PublicKey publicKey, javax.crypto.SecretKey secretKey)
static java.security.KeyPair
generateKeyPair()
static javax.crypto.Cipher
getCipher(int mode, java.security.Key key)
-
Constructor Details
-
MojangCrypt
public MojangCrypt()
-
-
Method Details
-
generateKeyPair
@Nullable public static java.security.KeyPair generateKeyPair() -
digestData
@Nullable public static byte[] digestData(java.lang.String data, java.security.PublicKey publicKey, javax.crypto.SecretKey secretKey) -
decryptByteToSecretKey
public static javax.crypto.SecretKey decryptByteToSecretKey(java.security.PrivateKey privateKey, byte[] bytes) -
decryptUsingKey
public static byte[] decryptUsingKey(java.security.Key key, byte[] bytes) -
getCipher
public static javax.crypto.Cipher getCipher(int mode, java.security.Key key)
-