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.
Table of Contents
Installation
Used next development environment
Used next development environment
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
Docs
More documentation and info at
Contributing
Copyright and Licence
Copyright (C) 2021 - 2024 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.
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
File details
Details for the file codecipher-1.4.7.tar.gz
.
File metadata
- Download URL: codecipher-1.4.7.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c03642264c10d39cdf2b8dd846905e6a9132dc17f53a2e3ee96c39e3e14d43e |
|
MD5 | 63efda10a49aa4ac523bdb47d5de8729 |
|
BLAKE2b-256 | c183f978f95fa325ff8d3884fe95302fd1d55d627054bda5f22914506fa2a8cf |
File details
Details for the file codecipher-1.4.7-py3-none-any.whl
.
File metadata
- Download URL: codecipher-1.4.7-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bcdbd4e91169a272af4651e761bd5003f4fa567335bed742c7ba7ce4f33872c |
|
MD5 | 1d30b01730adfe20bf524844445d203c |
|
BLAKE2b-256 | f7fe474bf2f5d5d5c9804371a50102cbd1f17515bb37600e521a1b9bcc308899 |