Cipher support

Mergable pull request for #80.