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
  • Playfair
  • Morse
  • Numerical 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-2.0.0.tar.gz (7.5 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-2.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli_pher-2.0.0.tar.gz
  • Upload date:
  • Size: 7.5 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-2.0.0.tar.gz
Algorithm Hash digest
SHA256 98fa1469d75210d4ef61a31a693e5e58f20d9955f063f1d3d2f951c6e8d14fe2
MD5 0e02ecc9a3e14645884fd2124a49476e
BLAKE2b-256 5ae9f976ec2c5aeb35c859e8916798551ceb5d959e670d22d1df9c47bcda8c8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_pher-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45af227d7837bd8524678a323aafac1cbb80b1b7696da41b68bc75a8634fd6fb
MD5 110872df8590750370a882ab7e679b57
BLAKE2b-256 cf090f327cd4555a38a0b613727539a63156c8f6656ce5d6796d6c3ca0e06f62

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