Skip to main content

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, 
    delete_data=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)

Encryption Process

Decryption Process

Authors

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.

Release files for pyaescbc 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyaescbc 1.0.0
File Size Uploaded
pyaescbc-1.0.0.tar.gz 504.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyaescbc 1.0.0
File Interpreter ABI Platform
pyaescbc-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / pyaescbc-1.0.0.tar.gz

Download URL pyaescbc-1.0.0.tar.gz
Size 504.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9f185ef70bbcef53f6f428aa94c483b53df88e4358423487516f727a5c1ed585
BLAKE2b-256 checksum
How to use checksums
339f0ea7f42f557c2d2959895bafd9f49b442c7b1c9dbb7af9a8a0e371c157a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / pyaescbc-1.0.0-py3-none-any.whl

Download URL pyaescbc-1.0.0-py3-none-any.whl
Size 510.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3cdb2c39172bf08c8bdf5ef39b518984bb4790b3c908ed045a5afbcd289acec
BLAKE2b-256 checksum
How to use checksums
99579325f0b426de1aefa466af83d829d7ab83a6408e366d83fb6b592eccda4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

2.1.0

2 release files

2.0.0

2 release files

This release

1.0.0 This release

2 release files

0.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page