SwiftGUI_Encryption 0.0.3__tar.gz → 0.0.4__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.
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/PKG-INFO +1 -1
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/pyproject.toml +1 -1
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/sg/dictFile.py +9 -2
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/LICENSE +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/README.md +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/Advanced/__init__.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/Advanced/low_level.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/__init__.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/basics.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/key_files.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/sg/__init__.py +0 -0
- {swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/sg/popup_create_password.py +0 -0
{swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/sg/dictFile.py
RENAMED
|
@@ -107,8 +107,10 @@ class PasswordJSONDictFile(EncryptedJSONDictFile):
|
|
|
107
107
|
**kwargs
|
|
108
108
|
)
|
|
109
109
|
|
|
110
|
-
def _regenerate_key(self):
|
|
111
|
-
|
|
110
|
+
def _regenerate_key(self, new_salt = True):
|
|
111
|
+
if new_salt:
|
|
112
|
+
self._salt = random_key(SALT_LEN)
|
|
113
|
+
|
|
112
114
|
self._filekey = adv.argon2_key_derivation(self._password.encode(), self._salt)
|
|
113
115
|
|
|
114
116
|
def change_key(self, new_key: bytes):
|
|
@@ -151,6 +153,11 @@ class PasswordJSONDictFile(EncryptedJSONDictFile):
|
|
|
151
153
|
) -> dict:
|
|
152
154
|
raw = path.read_bytes()
|
|
153
155
|
|
|
156
|
+
salt = raw[:SALT_LEN]
|
|
157
|
+
if salt != self._salt:
|
|
158
|
+
self._salt = salt
|
|
159
|
+
self._regenerate_key(new_salt=False)
|
|
160
|
+
|
|
154
161
|
raw = decrypt_full(raw[SALT_LEN:], self._filekey).decode()
|
|
155
162
|
return json.loads(raw)
|
|
156
163
|
|
|
File without changes
|
|
File without changes
|
{swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/Advanced/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/key_files.py
RENAMED
|
File without changes
|
{swiftgui_encryption-0.0.3 → swiftgui_encryption-0.0.4}/src/SwiftGUI_Encryption/sg/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|