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)
# Want the sha256 hex digest of some text?
sha256 = tpp.sha256hex(test_password)
print(sha256)
License
Free software: MIT license
Documentation: https://text-password-protect.readthedocs.io.
History
0.2.0 (2022-06-16)
Adding sha256 capabilities
0.1.1 (2022-06-16)
Few minor tweaks to docs, READMEs. Code didn’t change
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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | db2ed9acc1e3c229089b142acab32a4bc268f141892dcd2726cdc1daaeb16f1a |
|
MD5 | b578e339a845bec28ba1281945c64766 |
|
BLAKE2b-256 | deef098b5578700ba19eb8f4bdfa2d7531f4c1279cb5fca88a305464de7cfb23 |
Close
Hashes for text_password_protect-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d348d5db6782ab4f04e4828f215f10e89f6a234b3dd97a58ecae40760495312e |
|
MD5 | 8bf9b79b9476d2c45357b3f5c69d0fb3 |
|
BLAKE2b-256 | 3fdfaa16f031bf1fa96ef527db0fc8af1b9aa223be338f97bf1c11bacca9a2be |