Vigenere cipher encryption for Python
Project description
vigenere-py
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
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
Hashes for vigenere_py-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6965a4ed5ac6c68326e4de5356622984e2af46dc7dcb1d236887c7a537d5eb9 |
|
MD5 | deb3fc29a1fbfe519e7b21c622c52e0f |
|
BLAKE2b-256 | 6c61275e7d1b2982887849170ecffa9184cf83045769464c97a54e0ce1e1baf4 |