Skip to main content

A package for encrypting files with a password.

Project description

Description

pydlock is 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.

Installation

pydlock is available on the Python Package Index (PyPI) at https://pypi.org/project/pydlock. To install pydlock, simply use the Python pip installer:

pip install pydlock

Usage

From the command line

To access the help method of the script:

user@computer:~$ python -m pydlock -h
usage: __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 ENCODING

To encrypt a file:

user@computer:~$ cat secret.txt
Shh! It's a secret!

user@computer:~$ python -m pydlock lock secret.txt
Enter password:
Re-enter password:

user@computer:~$ cat secret.txt
gAAAAABeqx971nHtXHi4dJYw8A_m_1mRYT8V2Sy4XPLqdg0t4mp9ooN-aTU1fuPQwEpwnuFiAfbJ6oPaN9IB1gzFT5-Tb4gFXQMw5uQUXDYV2Pvso6E5lXQ=

To decrypt a file:

user@computer:~$ python -m pydlock unlock secret.txt
Enter password:

user@computer:~$ cat secret.txt
Shh! It's a secret!

In other Python modules

import pydlock

filename = "secret.txt"

with open(filename, "w+") as file:

    print("Shh! It's a secret!", file = file)

pydlock.lock(filename)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydlock-1.2.0.10.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydlock-1.2.0.10-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pydlock-1.2.0.10.tar.gz.

File metadata

  • Download URL: pydlock-1.2.0.10.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for pydlock-1.2.0.10.tar.gz
Algorithm Hash digest
SHA256 879e32d032c14da3c08d61a46417543bc9f7678e178ffe33ffef3e0ee626f55f
MD5 81a51e74cb4d78713f2d0dda84d795f1
BLAKE2b-256 36e0412e36c6c867243963787b15047a650a8a3647af9815fee7f35ac813f649

See more details on using hashes here.

File details

Details for the file pydlock-1.2.0.10-py3-none-any.whl.

File metadata

  • Download URL: pydlock-1.2.0.10-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for pydlock-1.2.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 576623cb29e0994f46650fc1b8bfdcf2c8af656194b10609ce52589f9ba4877f
MD5 a0e64f9a838746a436bdb86179d697ea
BLAKE2b-256 d7564724e399532c54ec1203f7f6447e048359525f7b06ae32f6e482e730e0ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page