Skip to main content

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()

Metadata

Release files for lockis 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lockis 1.0.2
File Size Uploaded
lockis-1.0.2.tar.gz 3.2 kB Details

Release files / lockis-1.0.2.tar.gz

Download URL lockis-1.0.2.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
50ec53230bc630cfb8ad2c7dbd1c4b4a8dd4c0816d9a79d3f927fd1ef193ef39
BLAKE2b-256 checksum
How to use checksums
7b001a49b43d4ae272f25ba719d40bfcbf0e5dba1a63bc2e7f6d514bcf01b24d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page