-
Notifications
You must be signed in to change notification settings - Fork 1
Base64 Serialization
Hempfest edited this page Dec 5, 2021
·
8 revisions
Encrypt entire objects into singular strings with HFEncoded
Anything attempting encryption is expected to inherit java.io Serializable or ConfigurationSerializable from bukkit, its important to know that along with implementation a unique id must be provided as well.
String serialized = new HFEncoded(yourObjectHere).serialize();
Object o = new HFEncoded(yourStringHere).deserialized(); // throws exception.
int i = new HFEncoded(yourStringHere).deserialize(Integer.class); // exceptions handled internally.
public class TestClass implements Serializable {
private static final long serialVersionUID = -5932203874408973373L;
private final Map<String, Object> map = new HashMap<>();
private String string;
private Number number;
public String getString() {
return string;
}
public Number getNumber() {
return number;
}
public Map<String, Object> getMap() {
return map;
}
}
String string = getTestClassAsString();
TestClass clazz = new HFEncoded(string).deserialize(TestClass.class);
-
- AFK Player Utility
- Command Builder
- Command Utility
- Complete GUI Builder
- Complete Head Database/Locator
- Cooldown Abstraction
- Custom Gradient Color Interface
- Custom ID Generation
- Directional Enumeration
- Economy Interface Wrapper
- Entity Creation Tools
- File Management
- Item Recipe Builder
- Item Modification Builder
- Legacy Safe NamespacedKey
- Listing Collections
- Material Matcher
- Message Formatter
- String Utility
- Tab Completion Builder
- Task Scheduling
- Template Creation
- TextComponent Builder
- Vault Permission Interface Wrapper