support for decrypting mode
Merge branch 'encrypt'