Name | bytecrypt JSON |
Version |
0.3.1
JSON |
| download |
home_page | None |
Summary | Easily encrypt/decrypt data with password |
upload_time | 2024-11-25 19:04:33 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2024 sm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
encrypt
decrypt
bytecrypt
encryption
decryption
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
### About
Bytecrypt is a python package for easy data encryption / decryption with password.
### Installation
```sh
pip install bytecrypt
```
### Usage
#### Example 1
```py
# main.py
from bytecrypt import *
# byte array
encrypted_data = encrypt_bytes(b"secret", b"password")
decrypted_data = decrypt_bytes(encrypted_data, b"password")
print("\nEncrypted data: " + str(encrypted_data.decode("utf-8")))
print("\nDecrypted data: " + str(decrypted_data.decode("utf-8")))
```
```sh
# output
$ python main.py
Encrypted data: gAAAAABnO7wzHm-WLv-s_fQgHRe_-0Al_CmzUU7XfZcRaRSBXbLy1j8Z97KhiY8nZbaHETyKSO_NuGQH1f73MMs58nrT7pxWJg==
Decrypted data: secret
```
#### Example 2 - encrypting / decrypting file contents
```py
# files
encrypt_file("path/to/file/test.docx", b"testPassword")
decrypt_file("path/to/file/test.docx", b"testPassword")
encrypt_file("path/to/file/test.docx", b"testPassword", encrypt_filename=True)
decrypt_file("path/to/file/test.docx", b"testPassword", decrypt_filename=True)
# files in directory
encrypt_directory("path/to/directory", b"testPassword")
decrypt_directory("path/to/directory", b"testPassword")
encrypt_directory("path/to/directory", b"testPassword", encrypt_filename=True)
decrypt_directory("path/to/directory", b"testPassword", decrypt_filename=True)
```
#### Example 3 - command line usage
```sh
# encrypt file contents
bytecrypt -e -f "test_file.txt" -p "test123"
# decrypt file contents
bytecrypt -d -f "test_file.txt" -p "test123"
# encrypt file name and its contents
bytecrypt -e -f "test_file.txt" -efn -p "test123"
# decrypt file name and its contents
bytecrypt -d -f "EJHF2_1bf...FHJ=" -dfn -p "test123"
# encrypt/decrypt string
bytecrypt -e -str "test_string-1234" -p "test123"
bytecrypt -d -str "tYWHbf_...2dHSL=" -p "test123"
# encrypt/decrypt files in directory
bytecrypt -e -dir "test/directory1" -p "test123"
bytecrypt -d -dir "test/directory1" -p "test123"
bytecrypt -e -dir . -p "test123"
bytecrypt -e -dir . -p -efn "test123"
bytecrypt -d -dir . -p -dfn "test123"
# encrypt all directories inside of a directory (recursive)
bytecrypt -e -dir "test/directory1" -r -p "test123"
```
#### Command line arguments:
```sh
-e ; --encrypt
-d ; --decrypt
-f ; --file
-dir ; --directory
-efn ; --encrypt_filename
-dfn ; --decrypt_filename
-str ; --string
-r ; --recursive
-p ; --password
```
Raw data
{
"_id": null,
"home_page": null,
"name": "bytecrypt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "encrypt, decrypt, bytecrypt, encryption, decryption",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/7c/5c/cf4ce3677100ea649ef2ea94fd8cf34ddc181a586d1356b88c0fd64953e7/bytecrypt-0.3.1.tar.gz",
"platform": null,
"description": "### About\nBytecrypt is a python package for easy data encryption / decryption with password.\n\n### Installation\n```sh\n\npip install bytecrypt\n\n```\n\n### Usage\n\n#### Example 1\n\n```py\n\n# main.py\n\nfrom bytecrypt import *\n\n# byte array\nencrypted_data = encrypt_bytes(b\"secret\", b\"password\")\ndecrypted_data = decrypt_bytes(encrypted_data, b\"password\")\n\nprint(\"\\nEncrypted data: \" + str(encrypted_data.decode(\"utf-8\")))\nprint(\"\\nDecrypted data: \" + str(decrypted_data.decode(\"utf-8\")))\n\n```\n\n```sh\n# output\n\n$ python main.py\n\nEncrypted data: gAAAAABnO7wzHm-WLv-s_fQgHRe_-0Al_CmzUU7XfZcRaRSBXbLy1j8Z97KhiY8nZbaHETyKSO_NuGQH1f73MMs58nrT7pxWJg==\n\nDecrypted data: secret\n\n\n```\n\n#### Example 2 - encrypting / decrypting file contents\n\n\n```py\n# files\nencrypt_file(\"path/to/file/test.docx\", b\"testPassword\")\ndecrypt_file(\"path/to/file/test.docx\", b\"testPassword\")\n\nencrypt_file(\"path/to/file/test.docx\", b\"testPassword\", encrypt_filename=True)\ndecrypt_file(\"path/to/file/test.docx\", b\"testPassword\", decrypt_filename=True)\n\n# files in directory\nencrypt_directory(\"path/to/directory\", b\"testPassword\")\ndecrypt_directory(\"path/to/directory\", b\"testPassword\")\n\nencrypt_directory(\"path/to/directory\", b\"testPassword\", encrypt_filename=True)\ndecrypt_directory(\"path/to/directory\", b\"testPassword\", decrypt_filename=True)\n\n\n```\n\n#### Example 3 - command line usage\n\n\n```sh\n\n# encrypt file contents\nbytecrypt -e -f \"test_file.txt\" -p \"test123\"\n\n# decrypt file contents\nbytecrypt -d -f \"test_file.txt\" -p \"test123\"\n\n# encrypt file name and its contents\nbytecrypt -e -f \"test_file.txt\" -efn -p \"test123\"\n\n# decrypt file name and its contents\nbytecrypt -d -f \"EJHF2_1bf...FHJ=\" -dfn -p \"test123\"\n\n# encrypt/decrypt string\nbytecrypt -e -str \"test_string-1234\" -p \"test123\"\nbytecrypt -d -str \"tYWHbf_...2dHSL=\" -p \"test123\"\n\n# encrypt/decrypt files in directory\nbytecrypt -e -dir \"test/directory1\" -p \"test123\"\nbytecrypt -d -dir \"test/directory1\" -p \"test123\"\nbytecrypt -e -dir . -p \"test123\"\nbytecrypt -e -dir . -p -efn \"test123\"\nbytecrypt -d -dir . -p -dfn \"test123\"\n\n# encrypt all directories inside of a directory (recursive)\nbytecrypt -e -dir \"test/directory1\" -r -p \"test123\"\n\n```\n\n#### Command line arguments:\n\n\n```sh\n\n-e ; --encrypt\n-d ; --decrypt\n-f ; --file\n-dir ; --directory\n-efn ; --encrypt_filename\n-dfn ; --decrypt_filename\n-str ; --string\n-r ; --recursive\n-p ; --password\n\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 sm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Easily encrypt/decrypt data with password",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"encrypt",
" decrypt",
" bytecrypt",
" encryption",
" decryption"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3da41723a17cea057f20df6dc7fd78bec996596476c7c367f3477e9749bacf70",
"md5": "9988f24b35f5f5a98f41ba53710bf14b",
"sha256": "b02740b4f2ce16a1cf235c4b8618ac9d72f5e85930d6ce928a707a18717ccc51"
},
"downloads": -1,
"filename": "bytecrypt-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9988f24b35f5f5a98f41ba53710bf14b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6766,
"upload_time": "2024-11-25T19:04:32",
"upload_time_iso_8601": "2024-11-25T19:04:32.351218Z",
"url": "https://files.pythonhosted.org/packages/3d/a4/1723a17cea057f20df6dc7fd78bec996596476c7c367f3477e9749bacf70/bytecrypt-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7c5ccf4ce3677100ea649ef2ea94fd8cf34ddc181a586d1356b88c0fd64953e7",
"md5": "d579e52b632cc652ab53b74838011b38",
"sha256": "a0d027f51dc6342619cd3967cdb84818a265b80c3ef76045ba5cb6cdbcbee533"
},
"downloads": -1,
"filename": "bytecrypt-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "d579e52b632cc652ab53b74838011b38",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6363,
"upload_time": "2024-11-25T19:04:33",
"upload_time_iso_8601": "2024-11-25T19:04:33.780448Z",
"url": "https://files.pythonhosted.org/packages/7c/5c/cf4ce3677100ea649ef2ea94fd8cf34ddc181a586d1356b88c0fd64953e7/bytecrypt-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 19:04:33",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "bytecrypt"
}