passphera-core 0.7.0__py3-none-any.whl → 0.8.1__py3-none-any.whl
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.
- passphera_core/generator.py +6 -2
- {passphera_core-0.7.0.dist-info → passphera_core-0.8.1.dist-info}/METADATA +4 -2
- passphera_core-0.8.1.dist-info/RECORD +7 -0
- passphera_core-0.7.0.dist-info/RECORD +0 -7
- {passphera_core-0.7.0.dist-info → passphera_core-0.8.1.dist-info}/WHEEL +0 -0
- {passphera_core-0.7.0.dist-info → passphera_core-0.8.1.dist-info}/top_level.txt +0 -0
passphera_core/generator.py
CHANGED
@@ -13,6 +13,8 @@ class PasswordGenerator:
|
|
13
13
|
multiplier: int = 3,
|
14
14
|
key: str = "hill",
|
15
15
|
algorithm: str = 'hill',
|
16
|
+
prefix: str = 'secret',
|
17
|
+
postfix: str = 'secret',
|
16
18
|
characters_replacements: dict = None,
|
17
19
|
):
|
18
20
|
"""
|
@@ -30,6 +32,8 @@ class PasswordGenerator:
|
|
30
32
|
self._key: str = key
|
31
33
|
self._algorithm_name: str = algorithm.lower()
|
32
34
|
self._algorithm = self._set_algorithm()
|
35
|
+
self._prefix: str = prefix
|
36
|
+
self._postfix: str = postfix
|
33
37
|
self._characters_replacements: dict = characters_replacements
|
34
38
|
|
35
39
|
@property
|
@@ -127,7 +131,7 @@ class PasswordGenerator:
|
|
127
131
|
case 'caesar':
|
128
132
|
return CaesarCipher(self._shift)
|
129
133
|
case 'affine':
|
130
|
-
return AffineCipher(self.
|
134
|
+
return AffineCipher(self._shift, self._multiplier)
|
131
135
|
case 'playfair':
|
132
136
|
return PlayfairCipher(self._key)
|
133
137
|
case 'hill':
|
@@ -166,7 +170,7 @@ class PasswordGenerator:
|
|
166
170
|
:return: str: The generated raw password
|
167
171
|
"""
|
168
172
|
self._update_algorithm_properties()
|
169
|
-
return self._algorithm.encrypt(f"
|
173
|
+
return self._algorithm.encrypt(f"{self._prefix}{text}{self._postfix}")
|
170
174
|
|
171
175
|
def generate_password(self, text: str) -> str:
|
172
176
|
"""
|
@@ -1,18 +1,20 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: passphera-core
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.1
|
4
4
|
Summary: The core system of passphera project
|
5
5
|
Home-page: https://github.com/passphera/core
|
6
6
|
Author: Fathi Abdelmalek
|
7
7
|
Author-email: abdelmalek.fathi.2001@gmail.com
|
8
|
-
Classifier: Development Status ::
|
8
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Classifier: Programming Language :: Python
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
13
|
Classifier: Topic :: Security
|
14
14
|
Classifier: Topic :: Security :: Cryptography
|
15
|
+
Requires-Python: >=3
|
15
16
|
Description-Content-Type: text/markdown
|
17
|
+
Requires-Dist: cipherspy
|
16
18
|
|
17
19
|
# passphera-core
|
18
20
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
passphera_core/__init__.py,sha256=ND2D_sTQk5mroNRsKm03PXhx0HNf0740hOtZ4_U98OQ,119
|
2
|
+
passphera_core/exceptions.py,sha256=PPZhy05QMVnN3mm6EGj-RgWanMaF3E6aKN4lcpNOJY8,158
|
3
|
+
passphera_core/generator.py,sha256=-lUrZLrNv1cqGBXzP5iQSixZ1WPIEiTCmVk_bpIi0Ow,6640
|
4
|
+
passphera_core-0.8.1.dist-info/METADATA,sha256=8KCnW0KdeeXLW0PQxtagb2Rn3a0TtEP13k5U6vDd4Ck,675
|
5
|
+
passphera_core-0.8.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
passphera_core-0.8.1.dist-info/top_level.txt,sha256=aDUX2iWGOyfzyf6XakLWTbgeWqNrypMHO074Qratyds,15
|
7
|
+
passphera_core-0.8.1.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
passphera_core/__init__.py,sha256=ND2D_sTQk5mroNRsKm03PXhx0HNf0740hOtZ4_U98OQ,119
|
2
|
-
passphera_core/exceptions.py,sha256=PPZhy05QMVnN3mm6EGj-RgWanMaF3E6aKN4lcpNOJY8,158
|
3
|
-
passphera_core/generator.py,sha256=49fqsvxtrywK1PQBP58ciOOrruYG4UhWDMW9eBsqaWk,6478
|
4
|
-
passphera_core-0.7.0.dist-info/METADATA,sha256=ILZ-bTpQFF_WcXmy3vOhzbn0l6Nn8U54MSmnWxdnEWI,628
|
5
|
-
passphera_core-0.7.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
passphera_core-0.7.0.dist-info/top_level.txt,sha256=aDUX2iWGOyfzyf6XakLWTbgeWqNrypMHO074Qratyds,15
|
7
|
-
passphera_core-0.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|