Skip to main content

A command line implementation of common ciphers

Project description

CLI-pher

Introduction

Welcome to CLI-pher! This is a command line implementation for quick encoding and decoding of text using common ciphers.

Supported ciphers

  • Caesar
  • Vigenere
  • Simple keyword substitution

Quickstart Guide

Install

CLI-pher is published to PyPI and can be installed via pip, uv, or any python package manager of your choice.

pip install cli-pher

Run

CLI-pher can be run using either cli-pher or clipher. For consistency, this guide will use cli-pher and the caesar command for each example.

For usage and full list of commands:

# Display help message for cli-pher
cli-pher --help

# Display help message for a specific supported cipher
# Usage: cli-pher COMMAND --help
cli-pher caesar --help

Running cipher encryption/decryption examples:

# Example - encrypting using caesar cipher with a shift of 3
cli-pher caesar 3 julius

# Example - decrypting using caesar cipher with a shift of 3
cli-pher caesar 3 mxolxv --decrypt

Interactive Mode

CLI-pher supports an "Interactive Mode" that prompts you for all necessary inputs instead of relying on positional arguments and CLI options. Interactive Mode is automatically started if any required arguments are missing from your cli-pher command.

Alternatively, you can enter interactive mode by passing the interactive flag:

cli-pher caesar --interactive

Here is an example of what interactive mode looks like:

$ cli-pher caesar --interactive
Entering interactive mode!
Encrypt or decrypt? (e/d):
$ e
Key:
$ 3
Text:
$ julius
mxolxv

Using CLI-pher as a library

CLI-pher can be added as a dependency to a python project and the ciphers module can be imported for programmatic encryption and decryption of supported CLI-pher ciphers.

from cli_pher.ciphers import caesar

ciphertext = caesar.encrypt('julius', 3)
print(f'Caesar encrypted text: {ciphertext}')

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

cli_pher-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

cli_pher-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file cli_pher-1.0.0.tar.gz.

File metadata

  • Download URL: cli_pher-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cli_pher-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4adc962ad66c21e8230941cf48ba066024e4311c1a8cc0e326b517992742e18d
MD5 35c50173a2811316d1ca288d86178a50
BLAKE2b-256 648d579113fb84ffa5aad7b96ea8238f422ef8625a9ef2254dd838b1558f8890

See more details on using hashes here.

File details

Details for the file cli_pher-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cli_pher-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cli_pher-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9d9e45a1cc928c303ca49ba8f0b6291668458f7b8004e2e5c0cc309bc4a661
MD5 935e4e8815caec65683e567f04002900
BLAKE2b-256 4ba2f73b4969dc8eda4403e02bca1f29cba7cbcd3e5e4aecc23f1dfe420627f3

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