Package net.minecraft.src
Class CryptManager
java.lang.Object
net.minecraft.src.CryptManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretKeyGenerate a new shared secret AES key from a secure random sourcestatic PublicKeydecodePublicKey(byte[] par0ArrayOfByte) Create a new PublicKey from encoded X.509 datastatic byte[]decryptData(Key par0Key, byte[] par1ArrayOfByte) Decrypt byte[] data with RSA private keystatic InputStreamdecryptInputStream(SecretKey par0SecretKey, InputStream par1InputStream) static SecretKeydecryptSharedKey(PrivateKey par0PrivateKey, byte[] par1ArrayOfByte) Decrypt shared secret AES key using RSA private keystatic byte[]encryptData(Key par0Key, byte[] par1ArrayOfByte) Encrypt byte[] data with RSA public keystatic OutputStreamencryptOuputStream(SecretKey par0SecretKey, OutputStream par1OutputStream) static KeyPairstatic byte[]getServerIdHash(String par0Str, PublicKey par1PublicKey, SecretKey par2SecretKey) Compute a serverId hash for use by sendSessionRequest()
-
Constructor Details
-
CryptManager
public CryptManager()
-
-
Method Details
-
generateKeyPair
-
getServerIdHash
public static byte[] getServerIdHash(String par0Str, PublicKey par1PublicKey, SecretKey par2SecretKey) Compute a serverId hash for use by sendSessionRequest() -
decodePublicKey
Create a new PublicKey from encoded X.509 data -
encryptData
Encrypt byte[] data with RSA public key -
decryptData
Decrypt byte[] data with RSA private key -
encryptOuputStream
public static OutputStream encryptOuputStream(SecretKey par0SecretKey, OutputStream par1OutputStream) -
decryptInputStream