passphera-core 0.2.0__tar.gz → 0.3.0__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.
- {passphera-core-0.2.0 → passphera-core-0.3.0}/PKG-INFO +1 -1
- passphera-core-0.3.0/passphera_core/__init__.py +2 -0
- passphera-core-0.3.0/passphera_core/exceptions.py +3 -0
- passphera-core-0.2.0/passphera_core/__init__.py → passphera-core-0.3.0/passphera_core/generator.py +7 -7
- {passphera-core-0.2.0 → passphera-core-0.3.0}/passphera_core.egg-info/PKG-INFO +1 -1
- {passphera-core-0.2.0 → passphera-core-0.3.0}/passphera_core.egg-info/SOURCES.txt +2 -0
- {passphera-core-0.2.0 → passphera-core-0.3.0}/setup.py +1 -1
- {passphera-core-0.2.0 → passphera-core-0.3.0}/README.md +0 -0
- {passphera-core-0.2.0 → passphera-core-0.3.0}/passphera_core.egg-info/dependency_links.txt +0 -0
- {passphera-core-0.2.0 → passphera-core-0.3.0}/passphera_core.egg-info/top_level.txt +0 -0
- {passphera-core-0.2.0 → passphera-core-0.3.0}/setup.cfg +0 -0
passphera-core-0.2.0/passphera_core/__init__.py → passphera-core-0.3.0/passphera_core/generator.py
RENAMED
@@ -1,9 +1,6 @@
|
|
1
1
|
from cipherspy.cipher import *
|
2
2
|
|
3
|
-
|
4
|
-
class InvalidAlgorithmException(Exception):
|
5
|
-
def __init__(self, algorithm: str) -> None:
|
6
|
-
super().__init__(f"Invalid algorithm name {algorithm}")
|
3
|
+
from .exceptions import InvalidAlgorithmException
|
7
4
|
|
8
5
|
|
9
6
|
class PasswordGenerator:
|
@@ -35,7 +32,10 @@ class PasswordGenerator:
|
|
35
32
|
self._key_iter: iter = key_iter
|
36
33
|
self._algorithm_name: str = algorithm.lower()
|
37
34
|
self._algorithm = self._set_algorithm()
|
38
|
-
|
35
|
+
if text:
|
36
|
+
self._password: str = f"secret{self._text.replace(' ', '')}secret"
|
37
|
+
else:
|
38
|
+
self._password: str = f'secret'
|
39
39
|
|
40
40
|
@property
|
41
41
|
def text(self) -> str:
|
@@ -55,7 +55,7 @@ class PasswordGenerator:
|
|
55
55
|
:return:
|
56
56
|
"""
|
57
57
|
self._text = text
|
58
|
-
self._password: str = f
|
58
|
+
self._password: str = f"secret{self._text.replace(' ', '')}secret"
|
59
59
|
|
60
60
|
@property
|
61
61
|
def shift(self) -> int:
|
@@ -227,5 +227,5 @@ class PasswordGenerator:
|
|
227
227
|
self._password = self._password.replace(char, replacement)
|
228
228
|
for char in self._password:
|
229
229
|
if char in self._text:
|
230
|
-
self._password = self.
|
230
|
+
self._password = self._password.replace(char, char.upper())
|
231
231
|
return self._password
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|