Skip to main content

Python Cipher Utilities

Project description

CODECipher

codecipher is package for cipher utilities.

Developed in python code.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

codecipher python checker codecipher package checker GitHub issues open GitHub contributors

Table of Contents

Installation

Used next development environment

debian linux os

codecipher python3 build

Currently there are three ways to install package

  • Install process based on using pip mechanism
  • Install process based on build mechanism
  • Install process based on setup.py mechanism
  • Install process based on docker mechanism
Install using pip

codecipher is located at pypi.org.

You can install by using pip

# python3
pip3 install codecipher
Install using build

Navigate to release page download and extract release archive.

To install codecipher, run

tar xvzf codecipher-x.y.z.tar.gz
cd codecipher-x.y.z
# python3
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py 
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
pip3 install -r requirements.txt
python3 -m build --no-isolation --wheel
pip3 install codecipher-x.y.z-py3-none-any.whl
rm -f get-pip.py
Install using py setup

Navigate to release page download and extract release archive.

To install codecipher, locate and run setup.py with arguments

tar xvzf codecipher-x.y.z.tar.gz
cd codecipher-x.y.z
# python3
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_egg_info
Install using docker

You can use Dockerfile to create image/container.

Dependencies

codecipher requires other modules and libraries (Python 3.x)

  • None

Usage

from codecipher.a1z52n62 import A1z52N62
from codecipher.atbs import AlephTawBetShin
from codecipher.b64 import B64
from codecipher.caesar import Caesar
from codecipher.vigenere import Vigenere
from codecipher.vernam import Vernam

print("A1z52N62 cipher")
cipher = A1z52N62()
data = "More Human Than Human01 Is Our Motto"
# encoding data
cipher.encode(data)
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data)
# decoded data
print(cipher.decode_data)
print(50*'=')

print("AlephTawBetShin cipher")
cipher = AlephTawBetShin()
data = "More Human Than Human01 Is Our Motto"
# encoding data
cipher.encode(data)
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data)
# decoded data
print(cipher.decode_data)
print(50*'=')

print("B64 cipher")
cipher = B64()
data = "More Human Than Human01 Is Our Motto"
# encoding data
cipher.encode(data)
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data)
# decoded data
print(cipher.decode_data)
print(50*'=')

print("Caesar cipher")
cipher = Caesar()
data = "More Human Than Human01 Is Our Motto"
# encoding data
cipher.encode(data, 3)
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data, 3)
# decoded data
print(cipher.decode_data)
print(50*'=')

print("Vigenere cipher")
cipher = Vigenere()
data = "More Human Than Human01 Is Our Motto"
cipher.data_len = len(data)
cipher.key = "AYUSH"
cipher.generate_key()
# encoding data
cipher.encode(data, cipher.key)
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data, cipher.key)
# decoded data
print(cipher.decode_data)
print(50*'=')

print("Vernam cipher")
cipher = Vernam()
data = "More Human Than Human01 Is Our Motto"
# encoding data
cipher.encode(data, "randomrandomrandom")
# encoded data
print(cipher.encode_data)
# decoding data
cipher.decode(cipher.encode_data, "randomrandomrandom")
# decoded data
print(cipher.decode_data)
print(50*'=')

Package structure

codecipher is based on OOP.

Package structure

    codecipher/
        ├── a1z52n62/
           ├── decode.py
           ├── encode.py
           └── __init__.py
        ├── atbs/
           ├── decode.py
           ├── encode.py
           ├── __init__.py
           └── lookup_table.py
        ├── b64/
           ├── decode.py
           ├── encode.py
           └── __init__.py
        ├── caesar/
           ├── decode.py
           ├── encode.py
           └── __init__.py
        ├── __init__.py
        ├── py.typed
        ├── vernam/
           ├── decode.py
           ├── encode.py
           └── __init__.py
        └── vigenere/
            ├── decode.py
            ├── encode.py
            ├── __init__.py
            ├── key_generator.py
            └── lookup_table.py
    
    7 directories, 23 files

Code coverage

Name Stmts Miss Cover
codecipher/__init__.py 0 0 100%
codecipher/a1z52n62/__init__.py 16 0 100%
codecipher/a1z52n62/decode.py 32 2 94%
codecipher/a1z52n62/encode.py 32 2 94%
codecipher/atbs/__init__.py 16 0 100%
codecipher/atbs/decode.py 29 2 93%
codecipher/atbs/encode.py 29 2 93%
codecipher/atbs/lookup_table.py 10 0 100%
codecipher/b64/__init__.py 16 0 100%
codecipher/b64/decode.py 24 2 92%
codecipher/b64/encode.py 24 2 92%
codecipher/caesar/__init__.py 16 0 100%
codecipher/caesar/decode.py 41 2 95%
codecipher/caesar/encode.py 41 2 95%
codecipher/vernam/__init__.py 16 0 100%
codecipher/vernam/decode.py 36 2 94%
codecipher/vernam/encode.py 36 2 94%
codecipher/vigenere/__init__.py 17 0 100%
codecipher/vigenere/decode.py 37 2 95%
codecipher/vigenere/encode.py 37 2 95%
codecipher/vigenere/key_generator.py 37 2 95%
codecipher/vigenere/lookup_table.py 16 0 100%
Total 558 26 95%

Docs

documentation status

More documentation and info at

Contributing

Contributing to codecipher

Copyright and Licence

License: GPL v3 License

Copyright (C) 2021 - 2026 by electux.github.io/codecipher

codecipher is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 3.x or, at your option, any later version of Python 3 you may have available.

Lets help and support PSF.

Python Software Foundation

Donate

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

codecipher-1.5.0.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

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

codecipher-1.5.0-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file codecipher-1.5.0.tar.gz.

File metadata

  • Download URL: codecipher-1.5.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.12.3

File hashes

Hashes for codecipher-1.5.0.tar.gz
Algorithm Hash digest
SHA256 f5ed138bf42a1670126950bc4852a963b9a3f87fba0e904d6ec6b99daae6a55c
MD5 bd8c7ffc05975929411cb54001e8a148
BLAKE2b-256 065499ff1226aa94ba49f7a5744316d40dc4e1d7b27a3977f0412bd843825765

See more details on using hashes here.

File details

Details for the file codecipher-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: codecipher-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 44.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.12.3

File hashes

Hashes for codecipher-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 795024441834221246c0259daa7562c1cfedf40f7f8d7e69bf90e0538ede4e17
MD5 82073ca76a9eb146e9dcbda4b76ccd3b
BLAKE2b-256 a4ecefbac32b706c61165baae54659f970f28fdfb954fbedc47e400deb9eb6cc

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