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 TextPassword Protect
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6a4a55b37693970890231daf235b60a885548c4d5d17d82c26fd7e299d427a4 |
|
MD5 | 2f5b658f84222e94cd46e630c0845311 |
|
BLAKE2b-256 | e9bafe7c92d37a09878107d0d7f33dbf6d401f1b73e5bd653cabc87367b66b26 |
Close
Hashes for text_password_protect-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0f5b11e148c5ce76c35bb6c4dd44dc2943433f645e65545636d6802a10c3486 |
|
MD5 | bb9ad008b83997f91776db8f066e24d2 |
|
BLAKE2b-256 | a632caae0820372ddc6334d717ffb9fe190579a050cc2e9c988d48ddd0b2f2d2 |