A simple encryption and decryption library for secure messaging.
Project description
StealthText
StealthText is a simple and secure library for encrypting and decrypting text messages using AES encryption. This package also provides a command-line interface for easy use.
Features
- Encryption: Securely encrypt text messages.
- Decryption: Decrypt previously encrypted messages.
- Command-Line Interface: Easily encrypt or decrypt messages directly from the terminal.
Installation
You can install StealthText using pip:
pip install StealthText
Usage
Importing the Library
You can use StealthText in your Python code by importing the encrypt and decrypt functions:
from stealthtext import encrypt, decrypt
Encrypting a Message
To encrypt a message, use the encrypt function:
password = 'your_password' # Use a strong password
message = 'Hello, world!' # Message to encrypt
encrypted_message = encrypt(message, password)
print(f'Encrypted Message: {encrypted_message}')
Decrypting a Message
To decrypt an encrypted message, use the decrypt function:
encrypted_message = 'your_encrypted_message_here' # Replace with your encrypted message
try:
decrypted_message = decrypt(encrypted_message, password)
print(f'Decrypted Message: {decrypted_message}')
except Exception as e:
print("Decryption failed:", e)
Command-Line Interface
Encrypt a Message
You can also use the command-line interface to encrypt messages:
stealthtext encrypt your_password "Hello, world!"
Decrypt a Message
To decrypt a message from the command line, use:
stealthtext decrypt your_password "your_encrypted_message_here"
Command-Line Arguments
- action: The action to perform, either
encryptordecrypt. - password: The password used for encryption or decryption.
- message: The message to encrypt or the encrypted message to decrypt.
Example
Here’s a full example of using the CLI:
- Encrypt a message :
stealthtext encrypt my_secret_password "This is a secret message."
Output :
Encrypted Message: [Base64 encoded string]
- Decrypt the message:
stealthtext decrypt my_secret_password "[Base64 encoded string]"
Output :
Decrypted Message: This is a secret message.
Security Recommendations
- Always use a strong password for encryption.
- Keep your passwords and encrypted messages secure.
- Consider using a password manager to store your passwords.
Contribution
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file StealthText-0.1.0.tar.gz.
File metadata
- Download URL: StealthText-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de626677fb8698d3fbe593d40ce64fa9c065c5c202c78ee29f465e6113c9e640
|
|
| MD5 |
897dc3b70295d3de72c4c6f3c6e8c9ff
|
|
| BLAKE2b-256 |
24431bac5e789f7a88925b68c33a9b37e100dd652fa46db2ec42e36b8f76dcae
|
File details
Details for the file StealthText-0.1.0-py3-none-any.whl.
File metadata
- Download URL: StealthText-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c0ed4e44dff58a5a2d71142a80f82989e911798e721bb42cb62b9430e0d762
|
|
| MD5 |
39dd337d38c43eda42c97891d8f69ed7
|
|
| BLAKE2b-256 |
aab98a97a828fc63482bdb1a19b7d471af4074fbec2847ae938fc850b1db8a76
|