Simple ECC encrypt decrypt
Project description
Ecceran
simple ECC encrypt & decrypt
Install
$ pip install ecceran
Generate Private Key
run ecceran in your command line for generate new secret key in .private_key
$ ecceran
public key : 02a4610d81d6c522ae67c2570********
the public key will be used to decrypt. generate command will return public key from file .private_key, to re-generate need to delete file private_key
Get Private Key
from ecceran import private_key
private_key_app = private_key()
# 5xa46gg0d81d6c522ae9ku2570********
Encrypt & Decrypt
from ecceran import encrypt, decrypt, private_key
pubkey = '02a4610d81d6c522ae67c2570********'
enc_data = encrypt(pubkey, b'test')
print(enc_data)
# d2zx4d81d6xxx2va67c24470********
prikey = private_key()
byte = bytes.fromhex(enc_data)
dec_data = decrypt(prikey, byte)
print(dec_data)
# b'test'
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 ecceran-0.1.1.tar.gz.
File metadata
- Download URL: ecceran-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5bb7f05b25483d7640a2daad4f7eaa209cabf42f3c8d2149e20f634161d84de
|
|
| MD5 |
8616e49439f74077cbacd0327ff408d6
|
|
| BLAKE2b-256 |
7afb59d687f7ef07f6cc176538224d058ae2f522bcc50128b56bfe24f9dedee7
|
File details
Details for the file ecceran-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ecceran-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb59a351e9f3c0434a38c4df1f33c070a1576dd5ac4458d1c5b04c9b8414b8e
|
|
| MD5 |
dac24ed180567e8ee78ed36eb41068a0
|
|
| BLAKE2b-256 |
03b3a62a0a4f4f76635b03778f820823a86384114b0c27e4988a471e5c70b858
|