dev@locazia: optimize imports

This commit is contained in:
user committed 2024-03-08 00:35:41 +03:00
1 parent 9859121c40
commit eba7bc02ab
37 files changed
+161 -155

No files matched your search

-1
View File
@@ -1,2 +1 @@
from app.core._crypto.signer import Signer
from app.core._crypto.cipher import Cipher
+2 -1
View File
@@ -1,6 +1,7 @@
import hashlib
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
import hashlib
class AESCipher:
+9 -7
View File
@@ -1,13 +1,15 @@
from app.core.models.node_storage import StoredContent
from app.core.models.keys import KnownKey
from app.core._config import PROJECT_HOST, UPLOADS_DIR
from app.core._crypto.cipher import AESCipher
from Crypto.Random import get_random_bytes
import os
from datetime import datetime
from hashlib import sha256
from base58 import b58encode, b58decode
import aiofiles
import os
from Crypto.Random import get_random_bytes
from base58 import b58encode
from app.core._config import UPLOADS_DIR
from app.core._crypto.cipher import AESCipher
from app.core.models.keys import KnownKey
from app.core.models.node_storage import StoredContent
async def create_new_encryption_key(db_session, user_id: int = None) -> KnownKey:
+2 -2
View File
@@ -1,6 +1,6 @@
import nacl.signing
import nacl.encoding
import base58
import nacl.encoding
import nacl.signing
class Signer: