Package net.minecraft.util
Class Crypt
java.lang.Object
net.minecraft.util.Crypt
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static interfaceCrypt.ByteArrayToKeyFunction<T extends Key>static final recordstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final intprivate static final Stringprivate static final Stringstatic final Base64.Encoderstatic final Stringprivate static final Stringprivate static final Stringstatic final com.mojang.serialization.Codec<PrivateKey>static final com.mojang.serialization.Codec<PublicKey>private static final Stringstatic final Stringstatic final intstatic final Stringprivate static final Stringprivate static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static PrivateKeybyteToPrivateKey(byte[] p_216083_) static PublicKeybyteToPublicKey(byte[] p_13601_) private static byte[]cipherData(int p_13587_, Key p_13588_, byte[] p_13589_) static SecretKeydecryptByteToSecretKey(PrivateKey p_13598_, byte[] p_13599_) static byte[]decryptUsingKey(Key p_13606_, byte[] p_13607_) private static byte[]digestData(byte[]... p_13603_) static byte[]digestData(String p_13591_, PublicKey p_13592_, SecretKey p_13593_) static byte[]encryptUsingKey(Key p_13595_, byte[] p_13596_) static KeyPairstatic SecretKeystatic Cipherstatic StringpemRsaPrivateKeyToString(PrivateKey p_216077_) static StringrsaPublicKeyToString(PublicKey p_216079_) private static <T extends Key>
 TrsaStringToKey(String p_216072_, String p_216073_, String p_216074_, Crypt.ByteArrayToKeyFunction<T> p_216075_) private static CiphersetupCipher(int p_13580_, String p_13581_, Key p_13582_) static PrivateKeystringToPemRsaPrivateKey(String p_216070_) static PublicKeystringToRsaPublicKey(String p_216081_) 
- 
Field Details- 
SYMMETRIC_ALGORITHM- See Also:
 
- 
SYMMETRIC_BITSprivate static final int SYMMETRIC_BITS- See Also:
 
- 
ASYMMETRIC_ALGORITHM- See Also:
 
- 
ASYMMETRIC_BITSprivate static final int ASYMMETRIC_BITS- See Also:
 
- 
BYTE_ENCODING- See Also:
 
- 
HASH_ALGORITHM- See Also:
 
- 
SIGNING_ALGORITHM- See Also:
 
- 
SIGNATURE_BYTESpublic static final int SIGNATURE_BYTES- See Also:
 
- 
PEM_RSA_PRIVATE_KEY_HEADER- See Also:
 
- 
PEM_RSA_PRIVATE_KEY_FOOTER- See Also:
 
- 
RSA_PUBLIC_KEY_HEADER- See Also:
 
- 
RSA_PUBLIC_KEY_FOOTER- See Also:
 
- 
MIME_LINE_SEPARATOR- See Also:
 
- 
MIME_ENCODER
- 
PUBLIC_KEY_CODEC
- 
PRIVATE_KEY_CODEC
 
- 
- 
Constructor Details- 
Cryptpublic Crypt()
 
- 
- 
Method Details- 
generateSecretKey- Throws:
- CryptException
 
- 
generateKeyPair- Throws:
- CryptException
 
- 
digestDatapublic static byte[] digestData(String p_13591_, PublicKey p_13592_, SecretKey p_13593_) throws CryptException - Throws:
- CryptException
 
- 
digestData- Throws:
- Exception
 
- 
rsaStringToKeyprivate static <T extends Key> T rsaStringToKey(String p_216072_, String p_216073_, String p_216074_, Crypt.ByteArrayToKeyFunction<T> p_216075_) throws CryptException - Throws:
- CryptException
 
- 
stringToPemRsaPrivateKey- Throws:
- CryptException
 
- 
stringToRsaPublicKey- Throws:
- CryptException
 
- 
rsaPublicKeyToString
- 
pemRsaPrivateKeyToString
- 
byteToPrivateKey- Throws:
- CryptException
 
- 
byteToPublicKey- Throws:
- CryptException
 
- 
decryptByteToSecretKeypublic static SecretKey decryptByteToSecretKey(PrivateKey p_13598_, byte[] p_13599_) throws CryptException - Throws:
- CryptException
 
- 
encryptUsingKey- Throws:
- CryptException
 
- 
decryptUsingKey- Throws:
- CryptException
 
- 
cipherData- Throws:
- CryptException
 
- 
setupCipher- Throws:
- Exception
 
- 
getCipher- Throws:
- CryptException
 
 
-