net.minecraft.util

## Class CryptManager

- java.lang.Object
- - net.minecraft.util.CryptManager

-     public class CryptManager
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CryptManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static KeyPair` | `createNewKeyPair()`
    `static SecretKey` | `createNewSharedKey()`
    `static PublicKey` | `decodePublicKey(byte[] par0ArrayOfByte)` Create a new PublicKey from encoded X.509 data
    `static byte[]` | `decryptData(Key par0Key, byte[] par1ArrayOfByte)` Decrypt byte[] data with RSA private key
    `static InputStream` | `decryptInputStream(SecretKey par0SecretKey, InputStream par1InputStream)`
    `static SecretKey` | `decryptSharedKey(PrivateKey par0PrivateKey, byte[] par1ArrayOfByte)` Decrypt shared secret AES key using RSA private key
    `static byte[]` | `encryptData(Key par0Key, byte[] par1ArrayOfByte)`
    `static OutputStream` | `encryptOuputStream(SecretKey par0SecretKey, OutputStream par1OutputStream)`
    `static byte[]` | `getServerIdHash(String par0Str, PublicKey par1PublicKey, SecretKey par2SecretKey)` Compute a serverId hash for use by sendSessionRequest()

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CryptManager

          public CryptManager()

  - ### Method Detail

    - #### createNewSharedKey

          public static SecretKey createNewSharedKey()

    - #### createNewKeyPair

          public static KeyPair createNewKeyPair()

    - #### 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)

    - #### 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)