Move encrypt and decrypt routines into tplink_utils.