This repository contains a simple implementation of the Bifid Cipher.
Create a BifidCipher object. You can create it using a predefined Polybius square, or you can generate one by default by leaving the variable empty.
from BifidCipher import BifidCipher
cipher = BifidCipher()
encrypted = cipher.encrypt_message('testing hello')
>>> cipher.decrypt_message(encrypted)
QTIXTMFNHVND
Additionally, you can supply a period/block size for the BifidCipher in the constructor.
from BifidCipher import BifidCipher
cipher = BifidCipher('ABCDEFGHIJKLMNOPQRSTUVWXYZ', period=3)
encrypted = cipher.encrypt_message('testing hello')