Skip to main content

Vigenere Cipher

The Vigenere cipher is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers, based on the letters of a keyword. It employs a form of polyalphabetic substitution.

Installation

This library uses python3 which can be download from here. After installing python, use pip to install the package.

$ pip install vigenere

No external dependencies required in this version.

Quick Start

Open the python shell and begin encrypting and decrypting texts with only 4 lines of commands.

>>> from vigenere import encrypt, decrypt, random_key
>>> cipher_key:str = random_key() # one can even use user-defined key such as `qwerty`
>>> cipher = encrypt('hello world', cipher_key) # with random_key function, cipher may vary everytime you run a program.
>>> decrypt(cipher, cipher_key)
'hello world'

It is noteworthy that the output of the encrypt function is encoded to base64. This can be changed by setting the default argument base64 to False.

encrypt(..agrs, base64=True) # returns base64 string
encrypt(..args, base64=False) # returns string of unicode chrs

Read the documention of the library

$ python
Python 3.9.0
Type "help", "copyright", "credits" or "license" for more information.
>>> import vigenere
>>> help(vigenere)

Security

The Vigenere Cipher is not a safe encryption algorithm and has multiple vulnerabilities.

One should not use this library for any official purpose, for its implementation is educational only. If you are downloading this package, it is expected that you have read the documentation and you truly understand the consequences.

I shall not be held responsible if you use this for encrypting confidential documents or messages.

License

MIT License

Metadata

Release files for vigenere 1.1.0

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

Source distribution (sdist)

Source distribution for vigenere 1.1.0
File Size Uploaded
vigenere-1.1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vigenere 1.1.0
File Interpreter ABI Platform
vigenere-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / vigenere-1.1.0.tar.gz

Download URL vigenere-1.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e999822d4836e2b0e33fa24341b4ad4d92d71c84e9e248327b1b9f9ee6043e54
BLAKE2b-256 checksum
How to use checksums
9cdf100f94173f1ce290de90e50948c5408aa0709a9a782fbe2de4bf412595a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

Release files / vigenere-1.1.0-py3-none-any.whl

Download URL vigenere-1.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54d8d2f5b56ae2906060dd10765cd5752339e5d649d6d3ff0d096c2061b992d3
BLAKE2b-256 checksum
How to use checksums
2ca2f7924ac68788a3de8218c80f89062385c4d48a72287e836a3b7bd2581393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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