Package: pydlock
Descriptionpydlockis a simple Python package for encrypting and decrypting files. It
can be used either as a package imported into other Python modules or as a
command line script.Installationpydlockis available on the Python Package Index (PyPI) athttps://pypi.org/project/pydlock. To installpydlock, simply use the
Pythonpipinstaller:pip install pydlockUsageFrom the command lineTo access thehelpmethod of the script, usepython -m pydlock -h:user@computer:~$python-mpydlock-husage: __main__.py [-h] [--arguments ARGUMENTS] [--encoding ENCODING]
                   {lock,unlock,python,run} file

positional arguments:
    {lock,unlock,python,run}
    file

optional arguments:
    -h, --help            show this help message and exit
    --arguments ARGUMENTS
    --encoding ENCODINGTo encrypt a file, usepython -m pydlock lock [file]:user@computer:~$catsecret.txtShh! It's a secret!user@computer:~$python-mpydlocklocksecret.txtEnter password:
Re-enter password:user@computer:~$catsecret.txtgAAAAABeqx971nHtXHi4dJYw8A_m_1mRYT8V2Sy4XPLqdg0t4mp9ooN-aTU1fuPQwEpwnuFiAfbJ6oPaN9IB1gzFT5-Tb4gFXQMw5uQUXDYV2Pvso6E5lXQ=To decrypt a file, usepython -m pydlock unlock [file]:user@computer:~$catsecret.txtgAAAAABeqx971nHtXHi4dJYw8A_m_1mRYT8V2Sy4XPLqdg0t4mp9ooN-aTU1fuPQwEpwnuFiAfbJ6oPaN9IB1gzFT5-Tb4gFXQMw5uQUXDYV2Pvso6E5lXQ=user@computer:~$python-mpydlockunlocksecret.txtEnter password:user@computer:~$catsecret.txtShh! It's a secret!To run an encrypted Python file, usepython -m pydlock python [file]:user@computer:~$cathello_world.pyprint("Hello world!")user@computer:~$python-mpydlocklockhello_world.pyEnter password:
Re-enter password:user@computer:~$cathello_world.pygAAAAABeq6fM4Qxm0TB9cGIg6G-uNprWIAyPmuciugNGIvPxudmBgkIWGhlV3Lg7RyMRdUVODRCehxWXnS5zhSm6fDZ0Ct57XYPztYi_9DZHp0sO1rXuyCE=user@computer:~$python-mpydlockpythonhello_world.pyEnter password:
Hello world!user@computer:~$cathello_world.pygAAAAABeq6fM4Qxm0TB9cGIg6G-uNprWIAyPmuciugNGIvPxudmBgkIWGhlV3Lg7RyMRdUVODRCehxWXnS5zhSm6fDZ0Ct57XYPztYi_9DZHp0sO1rXuyCE=In other Python modulesimportpydlockfilename="secret.txt"withopen(filename,"w+")asfile:print("Shh! It's a secret!",file=file)pydlock.lock(filename)Copyright and LicenseCopyrightPydlock - A Python file encryption tool.Copyright (c) 2020 of Erick Edward Shepherd, all rights reserved.LicenseMIT LicenseCopyright (c) 2020 Erick Edward ShepherdPermission 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.