Class CryptManager

java.lang.Object
net.minecraft.src.CryptManager

public class CryptManager extends Object
  • Constructor Details

    • CryptManager

      public CryptManager()
  • Method Details

    • createNewSharedKey

      public static SecretKey createNewSharedKey()
      Generate a new shared secret AES key from a secure random source
    • generateKeyPair

      public static KeyPair generateKeyPair()
    • getServerIdHash

      public static byte[] getServerIdHash(String par0Str, PublicKey par1PublicKey, SecretKey par2SecretKey)
      Compute a serverId hash for use by sendSessionRequest()
    • decodePublicKey

      public static PublicKey decodePublicKey(byte[] par0ArrayOfByte)
      Create a new PublicKey from encoded X.509 data
    • decryptSharedKey

      public static SecretKey decryptSharedKey(PrivateKey par0PrivateKey, byte[] par1ArrayOfByte)
      Decrypt shared secret AES key using RSA private key
    • encryptData

      public static byte[] encryptData(Key par0Key, byte[] par1ArrayOfByte)
      Encrypt byte[] data with RSA public key
    • decryptData

      public static byte[] decryptData(Key par0Key, byte[] par1ArrayOfByte)
      Decrypt byte[] data with RSA private key
    • encryptOuputStream

      public static OutputStream encryptOuputStream(SecretKey par0SecretKey, OutputStream par1OutputStream)
    • decryptInputStream

      public static InputStream decryptInputStream(SecretKey par0SecretKey, InputStream par1InputStream)