encdecpy
Python package to encode and decode strings using ciphers.
Installation
$ pip install encdecpy
Usage
The package provides the following ciphers to encode and decode strings -
- Affine Cipher
- Atbash Cipher
- Autokey Cipher
- Baconian Cipher
- Base64 Cipher
- Beaufort Cipher
- Caesar Cipher
- Columnar Transposition Cipher
- Polybius Square Cipher
- Rail Fence Cipher
- ROT13 Cipher
- Running Key Cipher
- Simple Substitution Cipher
- Vignere Cipher
Affine Cipher
from encdecpy import affine
- affine.encode(string, a, b) - Returns the encoded string.
- affine.decode(string, a, b) - Returns the decoded string.
a and b are integers between 0 and 25. a should be relatively prime to 26 and lie between 0 to 25 (both inclusive).
Atbash Cipher
from encdecpy import atbash
- atbash.encode(string) - Returns the encoded string.
- atbash.decode(string) - Returns the decoded string.
Autokey Cipher
from encdecpy import autokey
- autokey.encode(string, key) - Returns the encoded string.
- autokey.decode(string, key) - Returns the decoded string.
key is a string.
Baconian Cipher
from encdecpy import baconian
- baconian.encode(string) - Returns the encoded string.
- baconian.decode(string) - Returns the decoded string.
Base64 Cipher
from encdecpy import base64
- base64.encode(string) - Returns the encoded string.
- base64.decode(string) - Returns the decoded string.
Beaufort Cipher
from encdecpy import beaufort
- beaufort.encode(string, key) - Returns the encoded string.
- beaufort.decode(string, key) - Returns the decoded string.
key is a string.
Caesar Cipher
from encdecpy import caesar
- caesar.encode(string, key) - Returns the encoded string.
- caesar.decode(string, key) - Returns the decoded string.
key is a whole number.
Columnar Transposition Cipher
from encdecpy import columnartransposition
- columnartransposition.encode(string, key) - Returns the encoded string.
- columnartransposition.decode(string, key) - Returns the decoded string.
key is a string and should contain unique characters between A-Z.
Polybius Square Cipher
from encdecpy import polybiussquare
- polybiussquare.encode(string, key) - Returns the encoded string.
- polybiussquare.decode(string, key) - Returns the decoded string.
key is a string and should contain unique characters between a-z with one alphabet missing. Length of key should be 25. An example key - phqgiumeaylnofdxkrcvstzwb.
Rail Fence Cipher
from encdecpy import railfence
- railfence.encode(string, key) - Returns the encoded string.
- railfence.decode(string, key) - Returns the decoded string.
key is a positive number denoting the number of rails.
ROT13 Cipher
from encdecpy import rot13
- rot13.encode(string) - Returns the encoded string.
- rot13.decode(string) - Returns the decoded string.
Running Key Cipher
from encdecpy import runningkey
- runningkey.encode(string, key) - Returns the encoded string.
- runningkey.decode(string, key) - Returns the decoded string.
key is a large string, usually a paragraph taken from a book.
Simple Substitution Cipher
from encdecpy import simplesubstitution
- simplesubstitution.encode(string, key) - Returns the encoded string.
- simplesubstitution.decode(string, key) - Returns the decoded string.
- simplesubstitution.generate_random_key() - Returns a randomly generated key.
key is a string containing a permutation of the alphabets (a-z), with no other characters. String should contain only unique characters.
Vignere Cipher
from encdecpy import vignere
- vignere.encode(string, key) - Returns the encoded string.
- vignere.decode(string, key) - Returns the decoded string.
key is a string, usually a single word.
Metadata
Release files for encdecpy 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| encdecpy-0.2.tar.gz | 6.8 kB | Without provenance | Details for encdecpy-0.2.tar.gz |
Release files / encdecpy-0.2.tar.gz
| Download URL | encdecpy-0.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdc5644b9d4c559a03b0c742272f85827cf124a79a5cf1de200cb6af0c4edb82
|
|
BLAKE2b-256 checksum How to use checksums |
3bcd1453cc84fd425109cfdcf9a9c5f611ab0dda25631556bba6b8998a983109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for encdecpy 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.