mantis-cli 14.0.0__tar.gz → 14.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mantis-cli-14.0.0/mantis_cli.egg-info → mantis-cli-14.0.1}/PKG-INFO +1 -1
- mantis-cli-14.0.1/mantis/__init__.py +1 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/crypto.py +3 -8
- {mantis-cli-14.0.0 → mantis-cli-14.0.1/mantis_cli.egg-info}/PKG-INFO +1 -1
- mantis-cli-14.0.0/mantis/__init__.py +0 -1
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/.gitignore +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/LICENSE +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/MANIFEST.in +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/README.md +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/TODO +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/__main__.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/command_line.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/environment.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/extensions/__init__.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/extensions/django.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/extensions/nginx.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/extensions/postgres.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/helpers.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/logic.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis/managers.py +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis_cli.egg-info/SOURCES.txt +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis_cli.egg-info/dependency_links.txt +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis_cli.egg-info/entry_points.txt +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis_cli.egg-info/requires.txt +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/mantis_cli.egg-info/top_level.txt +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/setup.cfg +0 -0
- {mantis-cli-14.0.0 → mantis-cli-14.0.1}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = '14.0.1'
|
|
@@ -2,15 +2,12 @@ from base64 import b64encode, b64decode
|
|
|
2
2
|
|
|
3
3
|
try:
|
|
4
4
|
from Crypto.Cipher import AES
|
|
5
|
-
from Crypto.Random import get_random_bytes
|
|
6
5
|
from cryptography.fernet import Fernet
|
|
7
6
|
except ImportError:
|
|
8
7
|
# not using cryptography
|
|
9
|
-
# pip install pycryptodome>=3.11.0
|
|
10
|
-
# TODO: only if using environment encryption!
|
|
11
8
|
raise ImportError('Install pycryptodome and cryptography!')
|
|
12
9
|
|
|
13
|
-
from mantis.helpers import CLI
|
|
10
|
+
from mantis.helpers import CLI, random_string
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
class Crypto(object):
|
|
@@ -18,10 +15,8 @@ class Crypto(object):
|
|
|
18
15
|
def generate_key(deterministically=False):
|
|
19
16
|
if deterministically:
|
|
20
17
|
# deterministically: length has to be 32, 48 or 64
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return x
|
|
24
|
-
|
|
18
|
+
return random_string(64)
|
|
19
|
+
|
|
25
20
|
return Fernet.generate_key()
|
|
26
21
|
|
|
27
22
|
@staticmethod
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = '14.0.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|