thank you for your reply. the problem with that is, certain characters (like "/"

are within the default charset which I can't handle.
Eventually, this string will wind up within a URL in the form
Code:
myurl.com/page.html?var=ABCabc123
, which is why I need to restrict the charset.
I've come up with a few ideas.[ol][li]there are 62 (26 x 2 + 10) characters that fall within my character set. convert the char value of each byte into a number between 1 and 62, and use that as the index for an array (where the array[0] = 'A', array[26] = 'a', array[52] = '0', etc).[/li][li]Construct a new java.nio.charset.Charset. This would only work within 1.4, So I'm not terribly excited about doing that from a portability standpoint (As this is open-source code which will be run/compiled by others). I like it simply because it makes sense to use the String(byte[] bytes, String charsetName) constructor approach.[/li][li]either disregard or generate new values for offending bytes. Disregarding is bad (who knows, I might get an empty string back), and who knows how long it might take to generate new values.[/li][/ol]I'm not a huge fan of any of these plans.. If it wasn't deprecated, I'd use something like String(byte[] ascii, int hibyte).
I'm getting the bytes from SecureRandom. Is there any way to limit the output on that? Or is there a better way of generating a random string of numbers and letters?
Thanks again for your time. Liam Morley
lmorley@gdc.wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."