encryption libray
Project description
kellanb-cryptography
an easy-to-use wrapper ontop of pycryptodome
installation
pip install kellanb-cryptography
use
kellanb-cryptography easy
a tool for quick and simple encryption
from kellanb-cryptography import easy
encrypted = easy.encrypt(data,key)
data: string
key: string
decrypted = easy.decrypt(encrypted,key)
encrypted: string
key: string
kellanb-cryptography key
generate a key from password
from kellanb_cryptography import key
key = key.gen_key_from_password(password, length=256)
password: string
length in bits: int
kellanb-cryptography aes
encrypt in aes
from kellanb_cryptography import aes
encrypted = aes.encrypt_aes(data, key,mode='GCM')
data: string
key: string, length 16,24,or 32
mode: 'GCM','EAX',or 'CCM', shows mode of operation
decrypted = aes.decrypt_aes(encrypted, key)
encrypted: string
key: string, length 16,24,or 32
kellanb-cryptography chacha20
encrypt in chacha20
from kellanb_cryptography import chacha20
encrypted = chacha20.encrypt_chacha_20(data, key)
data: string
key: string, 32
decrypted = aes.decrypt_chacha20(encrypted, key)
encrypted: string
key: string, length 32
kellanb-cryptography hash
generate a key from password
from kellanb_cryptography import hash
hash.sha256(data)
data: string, data to be hashed
hash.sha256(data)
data: string, data to be hashed
hash.512(data)
data: string, data to be hashed
hash.sha3_256(data)
data: string, data to be hashed
hash.sha3_512(data)
data: string, data to be hashed
kellanb-cryptography hmac
tamper-proof your messages
from kellanb_cryptography import hmac
mac = hmac.create_hmac(data,password)
data: string, password: password to verify with
NOTE: THIS WILL NOT ENCRYPT YOUR DATA
hmac.verify_hmac(data,mac,password)
returns 1 for not tampered, a zero for check fail (data tampered)
data: data to verify mac: HMAC code password: password to verify with
Project details
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
File details
Details for the file kellanb_cryptography-1.2.3.tar.gz
.
File metadata
- Download URL: kellanb_cryptography-1.2.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b112f0df16e127561b2bedb0f5804d27ebb3440ff6a27bac531ab2a7b0db3d5 |
|
MD5 | 0c7284084e404c725dd92aadf449ce1b |
|
BLAKE2b-256 | 7689cdbedb3b85755db7de86daddd172b6e0fa5f462ca1872d6c6d1914687b76 |
File details
Details for the file kellanb_cryptography-1.2.3-py3-none-any.whl
.
File metadata
- Download URL: kellanb_cryptography-1.2.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3181b969cb5fcd413ea7ecf53b5a986dbb7d3c1930edb3bed664b5a0132cc5b4 |
|
MD5 | 1f7560a921b2188ca5f478eceae8ed27 |
|
BLAKE2b-256 | f8cb33f19493a0c89c057fe1c06241d4c9e3597c0c0997785aa565bd24cf6699 |