Refactoring encryption.