Use Greg's suggested algorithm for bytes_to_hex