类 Crypt
java.lang.Object
net.minecraft.util.Crypt
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static interface
Crypt.ByteArrayToKeyFunction<T extends Key>
static final record
static class
-
字段概要
字段修饰符和类型字段说明private static final String
private static final int
private static final String
private static final String
static final Base64.Encoder
static final String
private static final String
private static final String
static final com.mojang.serialization.Codec<PrivateKey>
static final com.mojang.serialization.Codec<PublicKey>
private static final String
static final String
static final int
static final String
private static final String
private static final int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static PrivateKey
byteToPrivateKey
(byte[] p_216083_) static PublicKey
byteToPublicKey
(byte[] p_13601_) private static byte[]
cipherData
(int pOpMode, Key pKey, byte[] pData) static SecretKey
decryptByteToSecretKey
(PrivateKey pKey, byte[] pSecretKeyEncrypted) static byte[]
decryptUsingKey
(Key pKey, byte[] pData) private static byte[]
digestData
(byte[]... pData) static byte[]
digestData
(String pServerId, PublicKey pPublicKey, SecretKey pSecretKey) static byte[]
encryptUsingKey
(Key pKey, byte[] pData) static KeyPair
static SecretKey
static Cipher
static String
pemRsaPrivateKeyToString
(PrivateKey p_216077_) static String
rsaPublicKeyToString
(PublicKey p_216079_) private static <T extends Key>
TrsaStringToKey
(String pKeyBase64, String pHeader, String pFooter, Crypt.ByteArrayToKeyFunction<T> pKeyFunction) private static Cipher
setupCipher
(int pOpMode, String pTransformation, Key pKey) static PrivateKey
stringToPemRsaPrivateKey
(String pKeyBase64) static PublicKey
stringToRsaPublicKey
(String pKeyBase64)
-
字段详细资料
-
SYMMETRIC_ALGORITHM
- 另请参阅:
-
SYMMETRIC_BITS
private static final int SYMMETRIC_BITS- 另请参阅:
-
ASYMMETRIC_ALGORITHM
- 另请参阅:
-
ASYMMETRIC_BITS
private static final int ASYMMETRIC_BITS- 另请参阅:
-
BYTE_ENCODING
- 另请参阅:
-
HASH_ALGORITHM
- 另请参阅:
-
SIGNING_ALGORITHM
- 另请参阅:
-
SIGNATURE_BYTES
public static final int SIGNATURE_BYTES- 另请参阅:
-
PEM_RSA_PRIVATE_KEY_HEADER
- 另请参阅:
-
PEM_RSA_PRIVATE_KEY_FOOTER
- 另请参阅:
-
RSA_PUBLIC_KEY_HEADER
- 另请参阅:
-
RSA_PUBLIC_KEY_FOOTER
- 另请参阅:
-
MIME_LINE_SEPARATOR
- 另请参阅:
-
MIME_ENCODER
-
PUBLIC_KEY_CODEC
-
PRIVATE_KEY_CODEC
-
-
构造器详细资料
-
Crypt
public Crypt()
-
-
方法详细资料
-
generateSecretKey
- 抛出:
CryptException
-
generateKeyPair
- 抛出:
CryptException
-
digestData
public static byte[] digestData(String pServerId, PublicKey pPublicKey, SecretKey pSecretKey) throws CryptException - 抛出:
CryptException
-
digestData
- 抛出:
Exception
-
rsaStringToKey
private static <T extends Key> T rsaStringToKey(String pKeyBase64, String pHeader, String pFooter, Crypt.ByteArrayToKeyFunction<T> pKeyFunction) throws CryptException - 抛出:
CryptException
-
stringToPemRsaPrivateKey
- 抛出:
CryptException
-
stringToRsaPublicKey
- 抛出:
CryptException
-
rsaPublicKeyToString
-
pemRsaPrivateKeyToString
-
byteToPrivateKey
- 抛出:
CryptException
-
byteToPublicKey
- 抛出:
CryptException
-
decryptByteToSecretKey
public static SecretKey decryptByteToSecretKey(PrivateKey pKey, byte[] pSecretKeyEncrypted) throws CryptException - 抛出:
CryptException
-
encryptUsingKey
- 抛出:
CryptException
-
decryptUsingKey
- 抛出:
CryptException
-
cipherData
- 抛出:
CryptException
-
setupCipher
- 抛出:
Exception
-
getCipher
- 抛出:
CryptException
-