Hello, can anyone show me an example or give me a clue about how
to generate a random alphanumeric string of lets say 16-32 chars?
TomCat is obviously doing it for the session ids, but how would I
do the same in a servlet?
Regards,
Christopher Cato
see tomcat sources, org.apache.tomcat.util.SessionIdGenerator namely
vVolf
-Oryginalna wiadomooe-
Od: Cato, Christopher [mailto:[EMAIL PROTECTED]]
Wysano: 1 marca 2001 15:05
Do: '[EMAIL PROTECTED]'
Temat: Generating a random alphanumeric string
Hello, can anyone show me
Cato,
Here is code that I tried out for generating a user id using the user name
I have to pass a string and it returns a 8 digit alpha numeric
Hope it helps,
Anil
public static String getCode(String text){
nextInt() % maxIndex);
resultID += validChars.charAt(rndPos);
}
return resultID;
}
}
// --- cut ---
-Original Message-
From: Cato, Christopher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 2:05 PM
To: '[EMAIL PROTECTED]'
Subject:
-
From: Cato, Christopher [mailto:[EMAIL PROTECTED]]
Sent: 01 March 2001 15:05
To: '[EMAIL PROTECTED]'
Subject: Generating a random alphanumeric string
Hello, can anyone show me an example or give me a clue about how
to generate a random alphanumeric string of lets say 16-32 chars?
TomCat is
PROTECTED]'
Temat: Generating a random alphanumeric string
Hello, can anyone show me an example or give me a clue about how
to generate a random alphanumeric string of lets say 16-32 chars?
TomCat is obviously doing it for the session ids, but how would I
do the same in a servlet?