A universal package for symmetric encryption (AES-GCM) and hashing (SHA256).
Project description
cryptopkg
Универсальный пакет для симметричного шифрования (AES-GCM) и хеширования (SHA256).
Установка зависимостей
pip install pycryptodome
Использование
from cryptopkg import CryptoLogic
key = b'some_32_byte_key________________' # 32 байта для AES-256
crypto = CryptoLogic(key)
# Шифрование
enc = crypto.encrypt('секретное сообщение')
print(enc)
# Дешифрование
plain = crypto.decrypt(enc)
print(plain)
# Хеширование
h = CryptoLogic.generate_hash('some data')
print(h)
Важно
- Ключ должен быть 16, 24 или 32 байта (AES-128/192/256).
- Не храните ключи в коде, используйте переменные окружения.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cryptopkg-0.1.0.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cryptopkg-0.1.0.tar.gz.
File metadata
- Download URL: cryptopkg-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a79f6b5d2d38ba2d4525e9b7b5f9a4ba18e3e32855528c4698396fbae08b1b5
|
|
| MD5 |
24fa57dde1cbc9fa04372574024ac6ca
|
|
| BLAKE2b-256 |
93023607db47f1ea6e7864bc33edd2e7e1a9cabe956cd0d87aa71109d9e1dc70
|
File details
Details for the file cryptopkg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cryptopkg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ee3adca6b2e20df101eb8ae9caaf46163bfeb7ad452e667339add2b9d8661e
|
|
| MD5 |
36b7e651cb85a08cd5bba6d5c0876d27
|
|
| BLAKE2b-256 |
06019a6c7aed596a299c9c34fa65ec85464706267a62185e1cbce4a6d05f0580
|