AES-CBC encryption tools based on crytography package.
Project description
pyaescbc
Description
AES-CBC encryption tools based on crytography package !
The package pyaescbc provides functions to encrypt and decrypt data using the AES-CBC encryption mode. The package is written in Python and uses the cryptography library for the AES encryption and decryption. The package also provides functions to generate a derived key from a password and a pin, and to create an HMAC value from the derived key, IV, and ciphertext. The package is designed to be easy to use and secure, and it is suitable for encrypting sensitive data.
General usage of the package includes:
import pyaescbc
# Encryption
cleardata = bytearray("Hello, World!", 'utf-8')
pin = bytearray("1234", 'utf-8')
password = bytearray("password", 'utf-8')
iterations = pyaescbc.generate_pin_iterations(pin, delete_keys=True)
authdata = bytearray("user=toto", 'utf-8') # Optional authentication data (can be None)
encrypted_bundle = pyaescbc.encrypt(cleardata, password, iterations, authdata=authdata, delete_keys=True)
# Decryption
pin = bytearray("1234", 'utf-8')
password = bytearray("password", 'utf-8')
iterations = pyaescbc.generate_pin_iterations(pin, delete_keys=True)
authdata = bytearray("user=toto", 'utf-8') # Optional authentication data (can be None)
decrypted_data = pyaescbc.decrypt(encrypted_bundle, password, iterations, authdata=authdata, delete_keys=True)
print(decrypted_data)
Authors
-
Artezaru artezaru.github@proton.me
-
Git Plateform: https://github.com/Artezaru/pyaescbc.git
-
Online Documentation: https://Artezaru.github.io/pyaescbc
Installation
Install with pip
pip install pyaescbc
pip install git+https://github.com/Artezaru/pyaescbc.git
Clone with git
git clone https://github.com/Artezaru/pyaescbc.git
License
Copyright 2025 Artezaru
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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
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 pyaescbc-0.1.5.tar.gz.
File metadata
- Download URL: pyaescbc-0.1.5.tar.gz
- Upload date:
- Size: 503.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb4eb6a13eaa46a1c39dd02844c2fce8f9e4d8e2d1d5be35ae70284e1b3fc640
|
|
| MD5 |
5c26430df62236c1d5af6341104f269d
|
|
| BLAKE2b-256 |
5a65ef3b917596b81ae2cd8899c0fbce7f71d0f1cf1d26734f4386f7c2f18362
|
File details
Details for the file pyaescbc-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyaescbc-0.1.5-py3-none-any.whl
- Upload date:
- Size: 510.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6322f900c920983b3dd982fedf1cab3fc8d2d0abf8f4c0c35b1c95ae2619ff12
|
|
| MD5 |
63e55d8d0367d0598162d0c68a6d2722
|
|
| BLAKE2b-256 |
5e4e563480238f3153a746df6c082a14ead8b40cedff80f8e4027b62474a0e88
|