Add a new method to setup encryption. bugfix 1