AESHandler
AESHandler is a package that makes AES encryption and decryption easy.
Usage
import aeshandler
# The aeshandler module comes with a key_from_password() method in the AESHandler class.
# This method takes in a password, and runs a KDF function to create a key.
password = b'Password1234!'
crypto_tuple = aeshandler.AESHandler.key_from_password(password) # Default KDF is Bcrypt
'''
OUTPUT: (b'password1234!', b'he0bB3t4OZtAqjQlv77QOq1LHg6wSeD9rNskEiAV5LsMYGDXS8rBkEPLDIeQNshf', b'\x14\xe8\xf0\xcf\xf1\x16\x9d\xb6J\x9b\xc0\xfe\xed\xd7\xe9\xd0\x82\x10scip\xea|L&\x81\xacH\xa8O\x0e')
First element is the password, second element is the salt used with the KDF, third element is the derived key.
'''
crypto_key = crypto_tuple[-1] # b'\x14\xe8\xf0\xcf\xf1\x16\x9d\xb6J\x9b\xc0\xfe\xed\xd7\xe9\xd0\x82\x10scip\xea|L&\x81\xacH\xa8O\x0e'
'''
AESHandler supports all AES modes. Such as CBC, CFB, XTS, and so on.
Using CBC in this instance.
This may require the padding=True argument for PKCS7 padding.
use_encoding=True returns ciphertexts in base64 format.
'''
a = aeshandler.AESHandler(crypto_key, aeshandler.modes.CBC, padding=True, use_encoding=True)
ciphertext = a.encrypt('Hello!') # M4ENqqe0m0ys4a7e1fnWHtJD+DbGNY5ckfbJBShxkJ0=
print(ciphertext)
print(a.decrypt(ciphertext)) # b'Hello!'
Metadata
Release files for aeshandler 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aeshandler-0.3.tar.gz | 3.5 kB | Without provenance | Details for aeshandler-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aeshandler-0.3-py3-none-any.whl | Python 3 | none | any | Details for aeshandler-0.3-py3-none-any.whl |
Total release size: 7.2 kB
Release files / aeshandler-0.3.tar.gz
| Download URL | aeshandler-0.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84fdb64ec4540e32108376914ecc4ed4603dfcbbe68e4fff911881de02ba9a0b
|
|
BLAKE2b-256 checksum How to use checksums |
d8577d66ffd6ef86a456f69968bf575d672ed943c79d973d1c0707a9fd45ada2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / aeshandler-0.3-py3-none-any.whl
| Download URL | aeshandler-0.3-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87036c2004dce4d238a7ceda27213d20b26356dc27c31140e8d2720fe383d836
|
|
BLAKE2b-256 checksum How to use checksums |
4b080facdc682c1a499a89c024477666489f2fe2068d047c538267d410b97d1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Security for aeshandler 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.