Super easy asymmetric encryption for python
Project description
Super easy asymmetric encryption for python
Introduction
python-asymcrypt is a wrapper around pycryptodome to make it even more easier for asymmetric encryption.
Installation
With pip
pip install asymcrypt
Usage
Generate keys files
import asymcrypt asymcrypt.generate_keys('my_private_key_file.pem','my_public_key_file.pem')
Encrypt data
data = 'A string, not an unicode' encrypted_data = asymcrypt.encrypt_data(data,'my_public_key_file.pem')
Decrypt data
data = asymcrypt.decrypt_data(encrypted_data,'my_private_key_file.pem')
Passphrase
As an option, you can use passphrase option in each functions to generate encrypted keys and read them when using encrypt/decrypt_data() functions
Base64
By default, output/input are binary. Nevertheless, you can encode into base64 in encrypt_data() by using option out_format='base64' or decode from base64 in decrypt_data() by using option in_format='base64'
Command line
Asymcrypt provides 3 commands :
To generate keys pair
asymgenkeys -priv private_key.pem -pub public_key.pem
To encrypt
asymencrypt -k public_key.pem -in file_to_encrypt.txt -out dest_file.enc
To decrypt
asymdecrypt -k private_key.pem -in encrypted_file.enc -out dest_file.txt
Note : you may use option -b or --base64 to encode/decode in base64 and -p or --passphrase to specify a passphrase to encrypt/decrypt keys
News
0.0.4 (2018-10-01)
Add console commands
Keys files are now cached
0.0.2 (2018-09-28)
First running version
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
Hashes for asymcrypt-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0748310e35ffcc413282f956e0f9c8a0b02208e73a48c929031530f3d6e3f9d |
|
MD5 | 58654de96c251454eeddad23cd4b35a4 |
|
BLAKE2b-256 | 801b80b111aca51b9783d57cb2ea0e96bdb14bfc1acf893bd25aae2673732b0e |