Skip to main content

A simple ChaCha20 encryption/decryption utility.

Project description

ChaCha20 Utils

A simple ChaCha20 encryption/decryption utility for Python.

PyPI Python Version License


Features

✔ Simple API for encryption and decryption
✔ Uses ChaCha20 for fast, secure encryption
Automatic nonce handling (prepended to ciphertext)
✔ Requires a 32-byte key for security


Installation

Install the package using pip:

pip install chacha20-utils

Usage

from chacha20_utils import ChaCha20Cipher

# Use a 32-byte secret key
key = b'your_32_byte_secret_key_________________'

cipher = ChaCha20Cipher(key)

# Encrypt
plaintext = b"Hello, ChaCha20!"
encrypted = cipher.encrypt(plaintext)
print("Encrypted:", encrypted)

# Decrypt
decrypted = cipher.decrypt(encrypted)
print("Decrypted:", decrypted)

Notes

  • The key must be exactly 32 bytes (256 bits).
  • The nonce is randomly generated and prepended to the ciphertext for decryption.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Author

Developed by Your Name
GitHub: yourusername

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

chacha20_utils-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chacha20_utils-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file chacha20_utils-0.1.0.tar.gz.

File metadata

  • Download URL: chacha20_utils-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chacha20_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff078c1b8958d8eddf4f7d2a34cfcb4905642171aa417e1438f05fde4367245a
MD5 f997076522578e8cccd1e167e40e4a23
BLAKE2b-256 d26339fec3c7c33afd9e66b172828c0ad3ec6f21a1a8359e96419205b3e1e6de

See more details on using hashes here.

File details

Details for the file chacha20_utils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chacha20_utils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chacha20_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d908cc804dd1b9484c851aa50b8fe7d3869db4c0d45cad28ece3cf128e387eb
MD5 e2d3680ea4b803eecf4e64d9085c3b2a
BLAKE2b-256 a3dae39c61af33ef98e51e902555074199f362482fdc0a9b1d6ed5bc5c80f3ec

See more details on using hashes here.

Supported by

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