Skip to main content

encrypt&decrypt

Every encoding and cipher from the first one (~1500 BC) to the present day — 58 languages, one dead-simple syntax, zero hard dependencies.

Install

Copy the encrypt_and_decrypt folder next to your script (or put its parent folder on PYTHONPATH), then:

from encrypt_and_decrypt import Encode, Decrypt

Usage

from encrypt_and_decrypt import Encode, Decrypt

Encode(Text="Hello", Language="caesar")          # 'Khoor'
Decode("Khoor", Language="caesar")               # 'Hello'
Decrypt(Encode(Text="Hello", Language="base64")) # chained syntax works
Decrypt("Khoor")                                 # Language="" -> auto-detect

Optional parameters:

Parameter Meaning
Text input string (leave empty to read from FilePath)
Language any id from list_languages() - required on Encode ("" raises); "" on Decrypt = auto-detect
FilePath read input from file (Text empty) / write result to file (Text given)
Key key for keyed ciphers (Vigenere, AES, RSA, ...) - defaults are built in
Key2 second key (ADFGVX, Four-square, Nihilist)
Period period for Bifid / Trifid (default 5)
Envelope True -> self-describing output `<<<ED

Aliases: Encode = Encrypt, Decrypt = Decode. Hashes (md5, sha256, ...) are one-way and cannot be decrypted.

Explore all 58 languages

from encrypt_and_decrypt import usage, list_languages
usage()                 # printed cheat-sheet, grouped by era
list_languages()        # machine-readable catalogue

Eras covered: Ancient (Scytale, Caesar, Atbash, Polybius, Tap code) → Classical (Vigenère, Beaufort, Autokey, Affine, Bacon, Nihilist, Rail Fence, Playfair, Four-square, Hill, Bifid, Trifid, ADFGVX) → Telegraph & Machine (Morse, Braille, Baudot, NATO, Enigma I) → Digital Age (Binary, Octal, Decimal, Hex, Base32/58/64/85, Ascii85, URL, HTML, Unicode escapes, Quoted-Printable, UUEncode) → Novelty (DNA, Emoji, Pig Latin, Leet) → Modern (XOR, RC4, AES-256, Fernet, 3DES, ChaCha20-Poly1305, RSA) → Hashes (CRC32, MD5, SHA-1/256/512, SHA-3, BLAKE2).

Local playground (built in)

Run the interactive cipher console on your own machine — zero extra dependencies, pure Python standard library:

python -m encrypt_and_decrypt.lab     # or, after pip install:
ed-lab

Then open http://127.0.0.1:8765. You get the full console: all 58 languages, auto-detect, keys, envelope mode. The server binds to localhost only and stops with Ctrl+C.

Dependencies

None required. If the cryptography package is installed, AES / Fernet / 3DES / ChaCha20 / Poly1305 use real hardware-accelerated primitives; otherwise a self-contained pure-Python fallback keeps everything working.

Metadata

Release files for encrypt-and-decrypt 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for encrypt-and-decrypt 1.0.1
File Size Uploaded Provenance Actions
encrypt_and_decrypt-1.0.1.tar.gz 40.5 kB Without provenance Details for encrypt_and_decrypt-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for encrypt-and-decrypt 1.0.1
File Interpreter ABI Platform Actions
encrypt_and_decrypt-1.0.1-py3-none-any.whl Python 3 none any Details for encrypt_and_decrypt-1.0.1-py3-none-any.whl

Total release size: 86.2 kB

Release files / encrypt_and_decrypt-1.0.1.tar.gz

Download URL encrypt_and_decrypt-1.0.1.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb436bf6e8ae5a28abc15d08a50230c44dab18dcecafe98b00f75c775d4a282b
BLAKE2b-256 checksum
How to use checksums
ab8e079682d245355d092fda9f5a3d843e54bdbf6157d9db5e5592356cc3dd9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / encrypt_and_decrypt-1.0.1-py3-none-any.whl

Download URL encrypt_and_decrypt-1.0.1-py3-none-any.whl
Size 45.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1baa83f11d02b2e004c452bed921671e770b8ac5b67d078aa5b4612a5f94d29
BLAKE2b-256 checksum
How to use checksums
022867c17f08dc8703de0c229fd629f6fd704caa184d483f1d98f86f066904fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for encrypt-and-decrypt 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page