Text this: Finite Automata and Application to Cryptography