Scytale cipher algorithm cli tool
Project description
Scytale
Just a very simple python script to calculate the scytale-cipher through an cli-wizard.
The projects main purpose is to showcase interesting tooling to build, publish and develop python apps.
Code Status
Code documentation: https://scytale.readthedocs.io
Description
The scytale was used more than 2500 years ago by the Spartans, and is one example of ancient cryptography. A message gets written on a ribbon which is then wrapped around a stick with a certain diameter (the scytale).
Below is a sample encryption of the plain text "prove me wrong!" with a scytale of diameter 3. We write the message around the scytale, and then
|p|r|o|
- - -
|v|e| |
- - -
|m|e| |
- - -
|w|r|o|
- - -
|n|g|!|
The cipher text is obtained by reading from top to bottom, left to right. In this example, the cipher text is
pvmwnreergo o!
Setup
Using Nix
To follow this path at least Nix has to be installed (and flakes have to be enabled).
-
nix develop
will drop you into a shell containing everything to further hack on the project. Inside the devShell invokingscytale
should bring up a prompt. -
nix run
will run the default app of the flake file. -
nix build
will build the default package with the help of poetry2nix -
default.nix is included to build the package the non-flake way with
nix-build
. -
shell.nix contains instructions to provide a non-flake shell via
nix-shell
.
Without Nix
At least Poetry needs to be installed.
-
poetry run scytale
will activate the poetry environment and execute the script held in pyproject.toml. If errors are occurringpoetry install
(installs the virtual environment and all given requirements) -
poetry shell
(activates and enters the virtual environment) -
poetry run python -m unittest discover
(runs all tests). Alternativelypoetry run python -m pytest tests
to use pytest for test execution.
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 scytale_cipher-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 327d35e4cb43577eb6997df5c1c20c07035b61e9b9876d197908d8b5946d3938 |
|
MD5 | 3aebab01aa46ce2f2a20a6eed6fb8b35 |
|
BLAKE2b-256 | cdc374bf232dd40b3e092f3e5b326684c51d86e30cfc3ab17632be9ca1c4e149 |