preface In the process of client authentication, we always have to obtain the unique identification information of the client, once thought that the MAC address would not change, but now various changes, especially the use of wireless Internet cards, the MAC address is plugged in and changed once, so it is meaningless to use MAC in this way
Principle Generate a unique identifier by obtaining the ID of the motherboard, processor, BIOS, mac, graphics card, hard disk, etc
suggested 1. Use those modules that are not replaced frequently to generate identification codes.
2. If you frequently replace MAC, graphics card, and hard drive, do not use these IDs.
3. Make sure to use static variables to save unique identifiers throughout the application.
realized
Supplement Now I encounter some simple models such as tablets, and all the device IDs obtained are the same (except mac), and finally I have to generate a logo of the software itself locally, and then attach it every time I calculate the logo, so that it will not be repeated again.
The code is as follows:
The file can be set to hide and other means to prevent users from misoperation.
|