encode string `data` as `hex`,data.encode('hex')