# 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.
```python
>>> 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
```python
lockis.version()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/mishakorzik/lockis",
"name": "lockis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "encryption, private, key, cipher, aes256, hmac, ttl, easy, sha256",
"author": "MishaKorzhik_He1Zen",
"author_email": "developer.mishakorzhik@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7b/00/1a49b43d4ae272f25ba719d40bfcbf0e5dba1a63bc2e7f6d514bcf01b24d/lockis-1.0.2.tar.gz",
"platform": null,
"description": "# Lockis\n\nEasily encrypt your sensitive data with double aes256+hmac and with ttl.\n\n```\n# import the module\nimport lockis\n\n# generate secret key (128 bytes)\nkey = lockis.gkey()\n\n# initilize secret key\nkey = lockis.lockis(key)\n\n# encrypt message\nkey.encrypt()\n\n# decrypt message with ttl 10 seconds\nkey.decrypt(data, ttl=10)\n```\n\nYou can also specify ttl, this will help protect against replay attacks.\n\n```python\n>>> import lockis\n>>> key = lockis.gkey()\n>>> key = lockis.lockis(key)\n>>> key.encrypt(b\"hello everyone, its a test message!\")\nb'EAAAAABnhh92pdLhypQcEsvwh4YUMuwzNg8RiQE2pJLnkT9Ru8tUSXvN6XGi3eeO1q-OiLD_E66pCpymr8Jw_BtrXB6Q1i9SeHe3l-NiCvGRZD2WOEmzjjH7MnyO7Haiw-hHdvs8SFZJgpssxR_tLAEvRaDcV9scC7Gfd2kwmdsok8wrRNvlpkE='\n>>> key.decrypt(b'EAAAAABnhh92pdLhypQcEsvwh4YUMuwzNg8RiQE2pJLnkT9Ru8tUSXvN6XGi3eeO1q-OiLD_E66pCpymr8Jw_BtrXB6Q1i9SeHe3l-NiCvGRZD2WOEmzjjH7MnyO7Haiw-hHdvs8SFZJgpssxR_tLAEvRaDcV9scC7Gfd2kwmdsok8wrRNvlpkE=', ttl=60)\nhello everyone, its a test message!\n```\n\n---\n\nhow to show the current version of installed lockis\n\n```python\nlockis.version()\n```\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Encrypt your private data with double aes256, hmac and with ttl.",
"version": "1.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/mishakorzik/lockis/issues",
"Donate": "https://www.buymeacoffee.com/misakorzik",
"Homepage": "https://github.com/mishakorzik/lockis"
},
"split_keywords": [
"encryption",
" private",
" key",
" cipher",
" aes256",
" hmac",
" ttl",
" easy",
" sha256"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7b001a49b43d4ae272f25ba719d40bfcbf0e5dba1a63bc2e7f6d514bcf01b24d",
"md5": "cbffc24fc10a2a06fc22f1d509b6cd89",
"sha256": "50ec53230bc630cfb8ad2c7dbd1c4b4a8dd4c0816d9a79d3f927fd1ef193ef39"
},
"downloads": -1,
"filename": "lockis-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "cbffc24fc10a2a06fc22f1d509b6cd89",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3176,
"upload_time": "2025-01-15T12:35:48",
"upload_time_iso_8601": "2025-01-15T12:35:48.258571Z",
"url": "https://files.pythonhosted.org/packages/7b/00/1a49b43d4ae272f25ba719d40bfcbf0e5dba1a63bc2e7f6d514bcf01b24d/lockis-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-15 12:35:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mishakorzik",
"github_project": "lockis",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lockis"
}