Skip to main content

protects a text with a password

Project description

protects a text with a password

pip install passprotecttxt

Tested against Windows 10 / Python 3.10 / Anaconda

Encryption:

The encrypt_text function provides a simple and secure way to encrypt text using AES encryption with CTR mode. AES is a widely used encryption algorithm known for its security and efficiency. CTR mode provides confidentiality and allows random access to the encrypted data.

Decryption:

The decrypt_text function complements the encryption process by decrypting the ciphertext back to its original plaintext form. It ensures that only authorized parties with the correct password can access and decrypt the data.

copy & paste example

from passprotecttxt import encrypt_text,decrypt_text

plaintext = "Hello, World!"
password = "MySecretPassword"

encrypted_text = encrypt_text(plaintext, password)
decrypted_text = decrypt_text(encrypted_text, password)

print("Plaintext:", plaintext)
print("Encrypted text:", encrypted_text)
print("Decrypted text:", decrypted_text)



# output

Plaintext: Hello, World!
Encrypted text: 63F720AC7E1F72B460271B2368
Decrypted text: Hello, World!

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

passprotecttxt-0.13.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

passprotecttxt-0.13-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file passprotecttxt-0.13.tar.gz.

File metadata

  • Download URL: passprotecttxt-0.13.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for passprotecttxt-0.13.tar.gz
Algorithm Hash digest
SHA256 ae64d623d40768d56154870e74dd663204ab9cc6ac7f9200dc990f2ed17b3576
MD5 bfd04a296e5d9534883ccc3b4181ebeb
BLAKE2b-256 604170e42ad30f8abe94ef93e064ac97abeba64962f8c7a35f6e89f6d2fc77a9

See more details on using hashes here.

File details

Details for the file passprotecttxt-0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for passprotecttxt-0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d589a0d2e4de93d27bc16bb4d18896558662a41d361015b94d0d7e016504fb0c
MD5 c05d7ad0bacc0641936479bb0f14a567
BLAKE2b-256 60860c2dadb40ae96465b1228a5061c596a405b4f9fa573fa2fcd906a76c3c9f

See more details on using hashes here.

Supported by

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