public final class SecureStorage extends IzouModule
While the stored information is encrypted, it is not safe from the user. In theory and with a lot of effort, the user could extract the keys and decrypt the stored information since the keys are not hidden from the user (only from addOns).
log, main
Constructor and Description |
---|
SecureStorage(Main main)
Creates a new SecureStorage instance if and only if none has been created yet
|
Modifier and Type | Method and Description |
---|---|
static SecureStorage |
createSecureStorage(Main main)
Creates an SecureStorage.
|
static SecureStorage |
getInstance()
Gets the instance of the secure storage object or null if it has not been created yet
|
SecureContainer |
retrieve(ro.fortsoft.pf4j.PluginDescriptor descriptor)
Retrieves a
SecureContainer with the given secure ID of the plugin descriptor |
void |
store(ro.fortsoft.pf4j.PluginDescriptor descriptor,
SecureContainer container)
Stores a
SecureContainer with the given secure ID of the plugin descriptor. |
debug, debug, error, error, fatal, fatal, getID, getMain
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isOwner
public SecureStorage(Main main) throws IllegalAccessException, NullPointerException
main
- the main instance of izouIllegalAccessException
- thrown if this method is called more than onceNullPointerException
public static SecureStorage createSecureStorage(Main main) throws IllegalAccessException
main
- the main instance of izouIllegalAccessException
- thrown if this method is called more than oncepublic static SecureStorage getInstance()
public void store(ro.fortsoft.pf4j.PluginDescriptor descriptor, SecureContainer container)
SecureContainer
with the given secure ID of the plugin descriptor. Each addOn can only have 1
secure container, so in order to update it, retrieve it and store it again.descriptor
- The plugin descriptor belonging to an addOncontainer
- The secure container to be stored with an addOnpublic SecureContainer retrieve(ro.fortsoft.pf4j.PluginDescriptor descriptor)
SecureContainer
with the given secure ID of the plugin descriptordescriptor
- The plugin descriptor belonging to an addOnCopyright © 2016. All rights reserved.