public class EncryptionUtil extends Object
| Constructor and Description |
|---|
EncryptionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decrypt(Key key,
String encryptedData) |
static BedrockData |
decryptBedrockData(Key key,
String encryptedData) |
static String |
encrypt(Key key,
String data) |
static String |
encryptBedrockData(Key key,
BedrockData data) |
static <T extends Key> |
getKeyFromFile(Path fileLocation,
Class<T> keyType) |
public static String encrypt(Key key, String data) throws IllegalBlockSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException
public static String encryptBedrockData(Key key, BedrockData data) throws IllegalBlockSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException
public static byte[] decrypt(Key key, String encryptedData) throws IllegalBlockSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException
public static BedrockData decryptBedrockData(Key key, String encryptedData) throws IllegalBlockSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException
public static <T extends Key> T getKeyFromFile(Path fileLocation, Class<T> keyType) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException
Copyright © 2020 GeyserMC. All rights reserved.