ADFGX / ADFGVX

Key
Ring
\
A D F G X
A
D
F
G
X

ADFGX

from pycipher import ADFGX

a = ADFGX('phqgmeaynofdxkrcvszwbutil','HOWAREU')

print a.encipher('hello world')
print a.decipher('AGXXDDAXFDDXXXFXXDXX')
    

ADFGVX

from pycipher import ADFGVX

a = ADFGVX('ph0qg64mea1yl2nofdxkr3cvs5zw7bj9uti8','HOWAREU')

print a.encipher('hello world')
print a.decipher('FVAAFXAAGDFFFGFFGDGF')