类 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 p_13587_, Key p_13588_, byte[] p_13589_) static SecretKey
decryptByteToSecretKey
(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 KeyPair
static SecretKey
static Cipher
static String
pemRsaPrivateKeyToString
(PrivateKey p_216077_) static String
rsaPublicKeyToString
(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 Cipher
setupCipher
(int p_13580_, String p_13581_, Key p_13582_) static PrivateKey
stringToPemRsaPrivateKey
(String p_216070_) static PublicKey
stringToRsaPublicKey
(String p_216081_)
-
字段详细资料
-
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 p_13591_, PublicKey p_13592_, SecretKey p_13593_) throws CryptException - 抛出:
CryptException
-
digestData
- 抛出:
Exception
-
rsaStringToKey
private static <T extends Key> T rsaStringToKey(String p_216072_, String p_216073_, String p_216074_, Crypt.ByteArrayToKeyFunction<T> p_216075_) throws CryptException - 抛出:
CryptException
-
stringToPemRsaPrivateKey
- 抛出:
CryptException
-
stringToRsaPublicKey
- 抛出:
CryptException
-
rsaPublicKeyToString
-
pemRsaPrivateKeyToString
-
byteToPrivateKey
- 抛出:
CryptException
-
byteToPublicKey
- 抛出:
CryptException
-
decryptByteToSecretKey
public static SecretKey decryptByteToSecretKey(PrivateKey p_13598_, byte[] p_13599_) throws CryptException - 抛出:
CryptException
-
encryptUsingKey
- 抛出:
CryptException
-
decryptUsingKey
- 抛出:
CryptException
-
cipherData
- 抛出:
CryptException
-
setupCipher
- 抛出:
Exception
-
getCipher
- 抛出:
CryptException
-