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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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