0

I have used GUID as an unique identifier and hashed it so that it generates a unique number. But a software update has changed the GUID and failed to produce the same unique number for the machine because hashing the new GUID produced another unique number different from the original one.

Now, I need a unique number which i can retrieve programmatically and does not change on software update.

harish sai
  • 31
  • 4
  • Also , Please do not suggest me to create my own GUID and save it in the registry because my drive is write protected and i cannot save anything to the registry. Hence creating my own GUID is not possible. – harish sai Jun 12 '18 at 19:06

1 Answers1

0

Actually you can create a version 5 Guid. This type of guid uses sha-1 to hash a name with a namespace. As long as you are always using the same name and namespace your guid will always be the same.

This document describes how the current 5 different types of guids are generated. See section 4.3. Algorithm for Creating a Name-Based UUID.

Community
  • 1
  • 1
Jmaurier
  • 767
  • 2
  • 10
  • 28