Ideas about Generating Untraceable Invoice IDs
c#, data-structures, integer, numbers, sql
Solution
I don't like the idea of using time. You can run into all sorts of issues - time differences, several events happening in a single second and so on.
If you want something sequential and not easily traceable, how about generating a random number between 1 and whatever you wish (for example 100) for each new Id. Each new Id will be the previous Id + the random number.
You can also add a constant to your IDs to make them look more impressive. For example you can add 44323 to all your IDs and turn IDs 15, 23 and 27 into 44338, 44346 and 44350.
Problem
I want to print invoices for customers in my app. Each invoice has an Invoice ID. I want IDs to be: - Sequential (ids entered lately come late) - 32 bit integers - Not easily traceable like 1 2 3 so that people can't tell how many items we sell. An idea of my own: Number of seconds since a specific date & time (e.g. 1/1/2010 00 AM). Any other ideas how to generate these numbers ?