# Variable dumpper/encryptor
[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)
[![Python 3.8.8](https://img.shields.io/badge/python-3.8.8-blue.svg)](https://www.python.org/downloads/release/python-388/)
## Example 1
```
# test.py
import varbox
class Glass:
def __init__(self):
self.amount = "500ml"
def set_amount(self,a):
self.amount = a
def get_amount(self):
return self.amount
g = Glass()
varbox.dump(1, 2, 3, g, filepath="var_file_path", varnames=["a", "b", "c", "g"])
k = varbox.load("var_file_path")
print(k["g"].amount)
```
## Example 2
```
import cipher
from constants import encryptions
print("==============================================================")
key = "0000000000000000"
plain_text = "I am the secret message"
encrypted_string,iv = cipher.encrypt(encryptions.AES, plain_text, key)
decrypted_text = cipher.decrypt(encryptions.AES, encrypted_string, key, iv)
print("plain_text\t\t\t:\t"+plain_text)
print("key\t\t\t\t\t:\t"+key)
print("encrypted_string\t:\t"+encrypted_string)
print("iv\t\t\t\t\t:\t"+str(iv))
print("decrypted_text\t\t:\t"+decrypted_text)
print("==============================================================")
key = "0000000000000000"
plain_text = "I am the secret message"
encrypted_string,iv = cipher.encrypt(encryptions.BLOW_FISH, plain_text, key)
decrypted_text = cipher.decrypt(encryptions.BLOW_FISH, encrypted_string, key, iv)
print("plain_text\t\t\t:\t"+plain_text)
print("key\t\t\t\t\t:\t"+key)
print("encrypted_string\t:\t"+encrypted_string)
print("iv\t\t\t\t\t:\t"+str(iv))
print("decrypted_text\t\t:\t"+decrypted_text)
print("==============================================================")
key = "0000000000000000"
plain_text = "I am the secret message"
encrypted_string,iv = cipher.encrypt(encryptions.ARC4, plain_text, key)
decrypted_text = cipher.decrypt(encryptions.ARC4, encrypted_string, key, iv)
print("plain_text\t\t\t:\t"+plain_text)
print("key\t\t\t\t\t:\t"+key)
print("encrypted_string\t:\t"+encrypted_string)
print("iv\t\t\t\t\t:\t"+str(iv))
print("decrypted_text\t\t:\t"+decrypted_text)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "varbox",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.8",
"maintainer_email": "",
"keywords": "varbox dump,varbox load,varbox pickle load,varbox pickle dump,varbox,variable dump,encryption,encryptor",
"author": "Aman Anand",
"author_email": "amananandofficials@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ef/bd/7b41e2466aa3fc0c1b57d94dacdc160aa34f7701761f2a36492cd7618aad/varbox-3.0.tar.gz",
"platform": null,
"description": "# Variable dumpper/encryptor \r\n\r\n[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/) \r\n[![Python 3.8.8](https://img.shields.io/badge/python-3.8.8-blue.svg)](https://www.python.org/downloads/release/python-388/) \r\n\r\n## Example 1\r\n\r\n ```\r\n# test.py\r\nimport varbox\r\nclass Glass:\r\n def __init__(self):\r\n self.amount = \"500ml\"\r\n def set_amount(self,a):\r\n self.amount = a\r\n def get_amount(self):\r\n return self.amount\r\n\r\ng = Glass()\r\nvarbox.dump(1, 2, 3, g, filepath=\"var_file_path\", varnames=[\"a\", \"b\", \"c\", \"g\"])\r\nk = varbox.load(\"var_file_path\")\r\nprint(k[\"g\"].amount)\r\n ```\r\n\r\n## Example 2\r\n\r\n ```\r\nimport cipher\r\nfrom constants import encryptions\r\nprint(\"==============================================================\")\r\nkey = \"0000000000000000\"\r\nplain_text = \"I am the secret message\"\r\nencrypted_string,iv = cipher.encrypt(encryptions.AES, plain_text, key)\r\ndecrypted_text = cipher.decrypt(encryptions.AES, encrypted_string, key, iv)\r\n\r\nprint(\"plain_text\\t\\t\\t:\\t\"+plain_text)\r\nprint(\"key\\t\\t\\t\\t\\t:\\t\"+key)\r\nprint(\"encrypted_string\\t:\\t\"+encrypted_string)\r\nprint(\"iv\\t\\t\\t\\t\\t:\\t\"+str(iv))\r\nprint(\"decrypted_text\\t\\t:\\t\"+decrypted_text)\r\n\r\nprint(\"==============================================================\")\r\nkey = \"0000000000000000\"\r\nplain_text = \"I am the secret message\"\r\nencrypted_string,iv = cipher.encrypt(encryptions.BLOW_FISH, plain_text, key)\r\ndecrypted_text = cipher.decrypt(encryptions.BLOW_FISH, encrypted_string, key, iv)\r\n\r\nprint(\"plain_text\\t\\t\\t:\\t\"+plain_text)\r\nprint(\"key\\t\\t\\t\\t\\t:\\t\"+key)\r\nprint(\"encrypted_string\\t:\\t\"+encrypted_string)\r\nprint(\"iv\\t\\t\\t\\t\\t:\\t\"+str(iv))\r\nprint(\"decrypted_text\\t\\t:\\t\"+decrypted_text)\r\nprint(\"==============================================================\")\r\nkey = \"0000000000000000\"\r\nplain_text = \"I am the secret message\"\r\nencrypted_string,iv = cipher.encrypt(encryptions.ARC4, plain_text, key)\r\ndecrypted_text = cipher.decrypt(encryptions.ARC4, encrypted_string, key, iv)\r\n\r\nprint(\"plain_text\\t\\t\\t:\\t\"+plain_text)\r\nprint(\"key\\t\\t\\t\\t\\t:\\t\"+key)\r\nprint(\"encrypted_string\\t:\\t\"+encrypted_string)\r\nprint(\"iv\\t\\t\\t\\t\\t:\\t\"+str(iv))\r\nprint(\"decrypted_text\\t\\t:\\t\"+decrypted_text)\r\n ```\r\n",
"bugtrack_url": null,
"license": "",
"summary": "varbox package can be used to dump and load multiple variables through local file and can also be used as encryption vault",
"version": "3.0",
"project_urls": null,
"split_keywords": [
"varbox dump",
"varbox load",
"varbox pickle load",
"varbox pickle dump",
"varbox",
"variable dump",
"encryption",
"encryptor"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9cbca26df2327a0b7859f01f733b53da7b6825882cd5e144b4bb53d820e3ec92",
"md5": "9471f8ee317a86296c18639f21c47619",
"sha256": "3bf1c6f4b7858b38b64b688b3808547b1c6823e3c8d1a30f59d5ab92197523cf"
},
"downloads": -1,
"filename": "varbox-3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9471f8ee317a86296c18639f21c47619",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.8",
"size": 6520,
"upload_time": "2023-05-08T17:35:01",
"upload_time_iso_8601": "2023-05-08T17:35:01.474887Z",
"url": "https://files.pythonhosted.org/packages/9c/bc/a26df2327a0b7859f01f733b53da7b6825882cd5e144b4bb53d820e3ec92/varbox-3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "efbd7b41e2466aa3fc0c1b57d94dacdc160aa34f7701761f2a36492cd7618aad",
"md5": "cd8fa042f64c152d4d8926eaae8a65fa",
"sha256": "f144babf0613f1a50dbe40d2698d321c4019b6b3039c4d52b34d1ebb8f5acc0c"
},
"downloads": -1,
"filename": "varbox-3.0.tar.gz",
"has_sig": false,
"md5_digest": "cd8fa042f64c152d4d8926eaae8a65fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.8",
"size": 4984,
"upload_time": "2023-05-08T17:35:03",
"upload_time_iso_8601": "2023-05-08T17:35:03.801029Z",
"url": "https://files.pythonhosted.org/packages/ef/bd/7b41e2466aa3fc0c1b57d94dacdc160aa34f7701761f2a36492cd7618aad/varbox-3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-08 17:35:03",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "varbox"
}