Currently I am trying to use this class, PyGenere.py found here
and my main aim is to produce an GUI program which is very similar to the website given earlier with few improvements such as selecting text files on keywords, encrypted text and freq. distribution for each language.
For now, I need some help on using the methods found in PyGenere.py class.
I been trying to figure out on using it.. Here are the codes that I written..
from pygenere import *
plaintext = 'Attack from dawn.'
key = 'king10'
ciphertext = Vigenere(plaintext).encipher(key)
print "Actual text as followed. " + plaintext
print "Encrypted test using key word: king10 as followed. " + ciphertext
print "Decrypted text as followed. " + Vigenere(ciphertext).decipher(key)
print "Using VigCrack to display keyword: " + VigCrack(ciphertext).crack_codeword()
print "Showing the actual message: " + VigCrack(ciphertext).crack_message()
Here is the output..
Actual text as followed. Attack from dawn.
Encrypted test using key word: king10 as followed. Kbgggn pzbs hdgv.
Decrypted text as followed: Attack from dawn.
Using VigCrack to display keyword: ZBSNO
Showing the actual message: Laotso ohoe icoi.
And you can see the last two results is not what I expected.
It is supposed to be..
Using VigCrack to display keyword: king10
Showing the actual message: Attack from dawn.