Additional clean up
Fix NPE when one of the encryption field not selected
Refactor encryption and move settings to data page

Refactored the encryption to add salt to the key generation for more
security. Moved the encryption settings to data setting page. Add tests
for encryption as well.