Merged with ui upstream
Implemented ui integration of encryption rules
Added haskey getkey callbacks