Simple cypher encoder/decoder