Lockis
Easily encrypt your sensitive data with double aes256+hmac and with ttl.
# import the module
import lockis
# generate secret key (128 bytes)
key = lockis.gkey()
# initilize secret key
key = lockis.lockis(key)
# encrypt message
key.encrypt()
# decrypt message with ttl 10 seconds
key.decrypt(data, ttl=10)
You can also specify ttl, this will help protect against replay attacks.
>>> import lockis
>>> key = lockis.gkey()
>>> key = lockis.lockis(key)
>>> key.encrypt(b"hello everyone, its a test message!")
b'EAAAAABnhh92pdLhypQcEsvwh4YUMuwzNg8RiQE2pJLnkT9Ru8tUSXvN6XGi3eeO1q-OiLD_E66pCpymr8Jw_BtrXB6Q1i9SeHe3l-NiCvGRZD2WOEmzjjH7MnyO7Haiw-hHdvs8SFZJgpssxR_tLAEvRaDcV9scC7Gfd2kwmdsok8wrRNvlpkE='
>>> key.decrypt(b'EAAAAABnhh92pdLhypQcEsvwh4YUMuwzNg8RiQE2pJLnkT9Ru8tUSXvN6XGi3eeO1q-OiLD_E66pCpymr8Jw_BtrXB6Q1i9SeHe3l-NiCvGRZD2WOEmzjjH7MnyO7Haiw-hHdvs8SFZJgpssxR_tLAEvRaDcV9scC7Gfd2kwmdsok8wrRNvlpkE=', ttl=60)
hello everyone, its a test message!
how to show the current version of installed lockis
lockis.version()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lockis-1.0.2.tar.gz
(3.2 kB
view details)
File details
Details for the file lockis-1.0.2.tar.gz.
File metadata
- Download URL: lockis-1.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ec53230bc630cfb8ad2c7dbd1c4b4a8dd4c0816d9a79d3f927fd1ef193ef39
|
|
| MD5 |
cbffc24fc10a2a06fc22f1d509b6cd89
|
|
| BLAKE2b-256 |
7b001a49b43d4ae272f25ba719d40bfcbf0e5dba1a63bc2e7f6d514bcf01b24d
|