Skip to main content

Vigenere cipher encryption for Python

Project description

vigenere-py

PyPI Changelog Tests License

Installation

Install this package with pipx for use as a standalone CLI:

pipx install vigenere-py

vigenere --help

Alternatively, you can install this package for use as a library via pip (ideally run this inside a virtualenv):

pip install vigenere-py

Usage

For help, run:

vigenere --help

You can also use:

python -m vigenere --help

Examples

Generating a key and encrypting:

$ vigenere genkey -a letters 20 > key.txt

$ cat key.txt
RVRTCLIWHNPZAOJLXEWY

$ cat plain.txt
ATTACK AT DAWN

$ vigenere enc -a letters -k key.txt plain.txt
ROKTEV IP KNLM

Decrypting:

$ cat key.txt
RVRTCLIWHNPZAOJLXEWY

$ cat cipher.txt
ROKTEV IP KNLM

$ vigenere dec -a letters -k key.txt cipher.txt
ATTACK AT DAWN

Interactive mode, end the message with ctrl+d:

$ vigenere enc -a letters
Key: •••••••••••••••••
Text to encrypt:
SECRET MESSAGE
Ciphertext:
QSWIIT PXZWDUG

Bash shell completions

_VIGENERE_COMPLETE=bash_source vigenere > ~/.local/share/bash-completion/completions/vigenere

Development

To contribute to this tool, first checkout the code.

Poetry

Poetry is used to manage dependencies and virtualenvs. So install poetry before proceeding.

I recommend installing poetry with pipx.

pipx install poetry

But if you don't want to use pipx, there are other installation instructions here: https://python-poetry.org/docs/#installation

Installing dependencies

cd vigenere-py
poetry install

Running the app

poetry run vigenere --help

Running tests

poetry run mypy .
poetry run pytest -v

Or, you can run these as a poe task:

Install poe:

pipx install poethepoet

Run tests:

poe test

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

vigenere_py-0.1.6.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

vigenere_py-0.1.6-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file vigenere_py-0.1.6.tar.gz.

File metadata

  • Download URL: vigenere_py-0.1.6.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for vigenere_py-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c33a966960e85bb6247cf828b474051f52c4872eb55d76b71f336aa5586a7e7f
MD5 0ff36d0a520bf5b345e00ed156116f1a
BLAKE2b-256 e10413a7ed92d225846cc04533b5c4f563bd563e3b969593f3494adeb234c633

See more details on using hashes here.

File details

Details for the file vigenere_py-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: vigenere_py-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for vigenere_py-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 198642a29f1f134d4fbad2543f2174762b8551bdaafe731589a114073b41dd37
MD5 55bdf3a31c3f753458c3138a05014881
BLAKE2b-256 9405c1c3c4f904b295d06d0127a503604066a4f70630b7b63ab9d17f65e20f66

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