as far as I know , when you want to register a product for a user ,
one common approach to it , is to use it's motherbord serial number or
the NIC's MAC address and then hash or encrypt it with some private
key then store the generated key in some file . but at the time I was
looking for it , I couldn't find a way to retrieve the MotherBoard
Serial number , but in case of MAC address I think it should be possible .
To implement it : firstly you can search for the file if it exist or not .
2- in case the file doesn't exist , get the username and a key which
should meet these criterias
first after encrypting the usename with the MAC address(Private Key) ,
the result should be the same as the entered key.