Add stream methods to do decryption / encryption.
Refactoring.