Create hex string without dependency on bc