Skip to main content

Text Password Protect

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

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.

Metadata

Release files for text-password-protect 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for text-password-protect 0.2.0
File Size Uploaded Provenance
text_password_protect-0.2.0.tar.gz 12.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for text-password-protect 0.2.0
File Interpreter ABI Platform
text_password_protect-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.4 kB

Release files / text_password_protect-0.2.0.tar.gz

Download URL text_password_protect-0.2.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
db2ed9acc1e3c229089b142acab32a4bc268f141892dcd2726cdc1daaeb16f1a
BLAKE2b-256 checksum
How to use checksums
deef098b5578700ba19eb8f4bdfa2d7531f4c1279cb5fca88a305464de7cfb23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Release files / text_password_protect-0.2.0-py2.py3-none-any.whl

Download URL text_password_protect-0.2.0-py2.py3-none-any.whl
Size 4.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d348d5db6782ab4f04e4828f215f10e89f6a234b3dd97a58ecae40760495312e
BLAKE2b-256 checksum
How to use checksums
3fdfaa16f031bf1fa96ef527db0fc8af1b9aa223be338f97bf1c11bacca9a2be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Security for text-password-protect 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page