A java program I wrote to help me do the homework in a cryptography class I took eons ago, saved here for posterity :)