scanner-utils: add helper for hex string escape