Creating a serial number
I'm trying to create a serial number for my program.
I'd like it to represent the relevant dates as wel开发者_如何学Pythonl as the user's name, company's name, etc.
Is there a common way to do this?A link to a tutorial/ article will be greatly appreciated.
You can have a look to the definition of the UUID (Universal Unique ID) which allows you to generate a unique number based on different parameters (MAC, date...)
Consider hash-functions (with salt) based on text that user provides.
It is usually done with hash of some sort. For a start you can read this article with simple enough registration scheme and corresponding discussion.
精彩评论