Adding code for running decryption and encryption in a background service