src/vs/base/common/hash.ts/toHexString
export function toHexString(bufferOrValue: ArrayBuffer | number, bitsize: number = 32): string {
	if (bufferOrValue instanceof ArrayBuffer) {
		return Array.from(new Uint8Array(bufferOrValue)).map(b => b.toString(16).padStart(2, '0')).join('');
	}

	return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4);
}