Encrypted fields management

Encrypting fields in database
Patch for compatibility
Adding tests
Indentation is only 4 characters