public class NetworkEncryptionUtils extends Object
| Constructor and Description |
|---|
NetworkEncryptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Cipher |
cipherFromKey(int opMode,
Key key) |
private static byte[] |
crypt(int opMode,
Key key,
byte[] data) |
private static Cipher |
crypt(int opMode,
String algorithm,
Key key) |
static byte[] |
decrypt(Key key,
byte[] data) |
static SecretKey |
decryptSecretKey(PrivateKey privateKey,
byte[] encryptedSecretKey) |
static byte[] |
encrypt(Key key,
byte[] data) |
static SecretKey |
generateKey() |
static byte[] |
generateServerId(String baseServerId,
PublicKey publicKey,
SecretKey secretKey) |
static KeyPair |
generateServerKeyPair() |
private static byte[] |
hash(byte[][] byte2) |
static PublicKey |
readEncodedPublicKey(byte[] byte2) |
@Environment(value=CLIENT) public static SecretKey generateKey() throws class_5525
class_5525public static KeyPair generateServerKeyPair() throws class_5525
class_5525public static byte[] generateServerId(String baseServerId, PublicKey publicKey, SecretKey secretKey) throws class_5525
class_5525@Environment(value=CLIENT) public static PublicKey readEncodedPublicKey(byte[] byte2) throws class_5525
class_5525public static SecretKey decryptSecretKey(PrivateKey privateKey, byte[] encryptedSecretKey) throws class_5525
class_5525@Environment(value=CLIENT) public static byte[] encrypt(Key key, byte[] data) throws class_5525
class_5525public static byte[] decrypt(Key key, byte[] data) throws class_5525
class_5525private static byte[] crypt(int opMode,
Key key,
byte[] data)
throws class_5525
class_5525private static Cipher crypt(int opMode, String algorithm, Key key) throws Exception
Exceptionpublic static Cipher cipherFromKey(int opMode, Key key) throws class_5525
class_5525