use iterator to transfer hex string to bin data