MACAddress::findAllAddresses() as a way to generate a UDID (unique device ID) on Windows, by concatenating the returned addresses. On mac and linux, where I can rely on gethostuuid(), but since on Windows I decided to use the mac addresses, since it’s a very common way to get a UDID.
But it seems that the addresses list returned by
MACAddress::findAllAddresses() can change, and every day I have some client complaining that the auth key is not working. A system crash, or some unrelated software install are sufficient to get me different results. I’m not sure if only the order or the actual contents of the addresses list is changed, because I only have access to the final ID I generate. But I can see the same addresses repeated in different places of the final generated id.
For example, those are all ids of the same computer, without any hardware change, just software. the mac address blocks seems to be in different order:
0c9d9240fc77-00ff1989daa5-34e12de4.... 0c9d9240fc77-00ff23e557fb-34e12de4.... 0c9d9240fc77-34e12de4a7a1-36e12de4....
So, is there a way I rely on the mac address list order?
Or even better… is there a better way to get solid UDID on windows?