Implement cipher

Adds simple `encrypt` and `decrypt` methods.