move encryption of syncing docs to local db