|
1 | 1 | from enrocrypt.error import *
|
2 |
| -from enrocrypt.basic import Password_Creator |
| 2 | +from enrocrypt.basic import Basic |
3 | 3 | import base64
|
4 | 4 | from cryptography.fernet import Fernet
|
5 | 5 | from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
|
@@ -107,20 +107,20 @@ def FileDecryption(self,Path:str,KeyFilePath:str):
|
107 | 107 | if KeyFilePath is None:
|
108 | 108 | NoKeyFile()
|
109 | 109 | def __Base_Auth_Encryption(self,data:bytes,optd:bytes = None):
|
110 |
| - password = Password_Creator() |
| 110 | + password = Basic.Password_Creator() |
111 | 111 | key = ChaCha20Poly1305.generate_key()
|
112 | 112 | encryptor = ChaCha20Poly1305(key)
|
113 | 113 | ed = encryptor.encrypt(password,data,optd)
|
114 | 114 | print([key,password,ed])
|
115 | 115 | return [key,password,ed]
|
116 | 116 | def __Base_AESCCM(self,data:bytes,optd:bytes = None):
|
117 |
| - password = Password_Creator() |
| 117 | + password = Basic.Password_Creator() |
118 | 118 | key = AESCCM.generate_key(256)
|
119 | 119 | encryptor = AESCCM(key)
|
120 | 120 | ed = encryptor.encrypt(password,data,optd)
|
121 | 121 | return [key,password,ed]
|
122 | 122 | def __Base_AESGCM(self,data:bytes,optd:bytes = None):
|
123 |
| - password = Password_Creator() |
| 123 | + password = Basic.Password_Creator() |
124 | 124 | key = AESGCM.generate_key(256)
|
125 | 125 | encryptor = AESGCM(key)
|
126 | 126 | ed = encryptor.encrypt(password,data,optd)
|
|
0 commit comments