matthew kane wrote:hi, I am looking for a program to generate a unique alphanumerical identifier that is not too long...
Any insight into how I can accomplish this using java would be appreciated. It is for a non profit humanitarian cause that relies on anonymous participation.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
matthew kane wrote:it is an id not a pin. it needs not have a pattern. it needs to be as short as possible (alphanumeric allows it to be shorter than with just numbers). needs to accomodate millions of unique id's(does anyone know how many unique possibilities there are with 6 digit alpha-numeric ?). it is to be used as the unique confidential identifier in a database. the confidential part makes it so that i can't use ip adress or mac adress to form the id.
Pawel Pawlowicz wrote:Well there are 26 letters in latin alphabet and there are 10 digits. Together 36 distinct characters.
So the number of distinct 6-character sequences is 36^6 = 2,176,782,336
@Winston, how did you get 2,116,316,160?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
matthew kane wrote:it is an id not a pin. it needs not have a pattern. it needs to be as short as possible (alphanumeric allows it to be shorter than with just numbers). needs to accomodate millions of unique id's(does anyone know how many unique possibilities there are with 6 digit alpha-numeric ?). it is to be used as the unique confidential identifier in a database. the confidential part makes it so that i can't use ip adress or mac adress to form the id.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
matthew kane wrote:sequential would be ok and 2 billion would be plenty( i think there may be an error in your formula; you can't count the number 10 since it is double digits : 1 to 9 + a to z is 35) how much is that?
matthew kane wrote:I think Z and the 2 are different enough provided a clear font is used. Perhaps I can use a font that has a line through the zero and just cull the letter o.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
matthew kane wrote:Only the user will know which code is theirs and site will not have cookies or collect any personal identification data (a completely anonymous participation)
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Richard Tookey wrote:I'm sceptical about this whole approach. If, as the OP seems to say, the ID is an identity for use in identifying a record in a database then one should use use an auto-increment data type for the identity column. The value should never be revealed outside of the application and a simple (user name, password) approach should be used to tie the a user to the identity.
matthew kane wrote:As long as nothing identifies users and everyone has access to all results the secrecy of the id is that only the user knows the id is theirs.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Paul Clapham wrote:Both of those websites are managing some of my money, for what it's worth, and the number points to my account. And both of them are just 7-digit numbers. However by far the commonest identification method is where I choose my user ID.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |