Updated encryption module example

This commit is contained in:
Anon 2022-10-09 13:57:10 -07:00
parent fc147deb89
commit 9a8b714d8d

View File

@ -25,13 +25,15 @@ If everything worked correctly you should see usage information on Create Plerom
If you want to change the default values for the input prompts, you can edit the source code directly in `src/create_app.py`
## Encryption
You can also encrypt your credentials with the encrypt.py module included in the repo. If you choose to use this with your custom bot, you must copy the module to your project's root directory. See below for an example implementation:
You can also encrypt your credentials with the encryption.py module included in the repo. If you choose to use this with your custom bot, you must copy the encryption.py module to your project's root source directory.
See below for an example implementation:
```
def decrypt_settings(self):
if self.settings_encrypt["encrypt"] and not self.decrypted and not self.debug_mode:
if self.settings_encrypt["encrypt"] and not self.decrypted:
import encryption
self.settings_server = encryption.settings_server_decrypt_cfg(self.settings_server, self.settings_encrypt)
self.settings_server = encryption.settings_server_decrypt(self.settings_server, self.settings_encrypt, keyfile_path)
self.decrypted = True
```