Extract from pluginsettings class so that the securejsondata type can be used in the other classes. Encrypt and decrypt functions extracted too.