Add encrypt attribute and filter. Closes #1329