2018-01-05 21:37:23 +01:00
|
|
|
package net.ME1312.SubServers.Bungee.Network;
|
|
|
|
|
2018-04-15 03:53:51 +02:00
|
|
|
import net.ME1312.SubServers.Bungee.Library.Config.YAMLSection;
|
2018-08-24 04:32:49 +02:00
|
|
|
import org.msgpack.value.Value;
|
2018-01-05 21:37:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SubData Cipher Layout Class
|
|
|
|
*/
|
|
|
|
public interface Cipher {
|
|
|
|
/**
|
|
|
|
* Get the name of this Cipher
|
|
|
|
*
|
|
|
|
* @return Cipher Name
|
|
|
|
*/
|
|
|
|
String getName();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Encrypt JSON Data
|
|
|
|
*
|
|
|
|
* @param key Key to Encrypt Data with
|
|
|
|
* @param data Data to Encrypt
|
|
|
|
* @return Encrypted Data Array
|
|
|
|
*/
|
2018-08-24 04:32:49 +02:00
|
|
|
Value encrypt(String key, YAMLSection data) throws Exception;
|
2018-01-05 21:37:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Decrypt Encrypted JSON Data
|
|
|
|
*
|
|
|
|
* @param key Key to Decrypt Data with
|
|
|
|
* @param data Encrypted Data Array
|
|
|
|
* @return JSON Data
|
|
|
|
*/
|
2018-08-24 04:32:49 +02:00
|
|
|
YAMLSection decrypt(String key, Value data) throws Exception;
|
2018-01-05 21:37:23 +01:00
|
|
|
}
|