format the uid as an hex string