Text this: Cryptography, automata and learning theory