I am developing software in Window 10 and Visual Studio in C++. I would like to restrict the use of the software to a set of computers, by implementing a license control.
My thought is to query a few key parameters from the system such CPU Type, Harddrive Serial Number, MAC address, and create a hash. I would then take the hash on my own computer and encrypt it using a private key and then when the software is used regenerate the hash and compare it to the decrypted value using a public key distributed with the system.
What would a valid (and easy to access) set of values to uniquely identify the system? Ideally, I'd like it to be flexible enough to allow a reformat of the OS but not allow copying the code to another system without permission.