updated c implementation of polyalphabetic substitution cipher