Protect any text with your own password
Project description
Protect any text with your own password.
Ever want a simple library to encrypt some text with a password? Well here it is. This is a great library for building quick One Time Secret apps in Python
Usage
To install run
pip install text-password-protect
In code:
from text_password_protect import TextPasswordProtect
test_text = "Hello There"
test_password = "General Kenobi"
# Create an instance of the class.
# You can set a salt an initialization time, change the salt with the
# set_salt method, or set TPPSALT as an environment variable, which will
# be read at initialization time.
tpp = TextPasswordProtect(salt="BAD_SALT_DO_NOT_USE!")
# Encrypt your message
ciphertext = tpp.encrypt(test_text, test_password)
# Ciphertext is of type bytes
print(ciphertext)
# Decrypt ciphertext
plaintext = tpp.decrypt(ciphertext, test_password)
print(plaintext)
License
Free software: MIT license
Documentation: https://text-password-protect.readthedocs.io.
History
0.1.0 (2022-06-15)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for text_password_protect-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bcb7830b8c5eda969faa9c5d1cfb727f51b478f4f71238df1c33efea8a4b65c |
|
MD5 | ad4b6eace606247a139460b189f32063 |
|
BLAKE2b-256 | 5d8ed8182c19f8d4e8c8f957700630f858224500cb8f691f3d73bcfc9612a75d |
Close
Hashes for text_password_protect-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4267501cd05f527c3df7b9e98f46b3b768476306afce7d1702418b40045ab541 |
|
MD5 | f514abb63ca983a6c5725ee4c3529c4a |
|
BLAKE2b-256 | d8d66769baa948fa7b1f3edc3d76099f7644d12485bf5e0a0deeaaba579d7a17 |