Javascript - generating a random number of specified length from set of specified values

Posted by RyanP13 on Stack Overflow See other posts from Stack Overflow or by RyanP13
Published on 2010-05-14T12:52:01Z Indexed on 2010/05/14 12:54 UTC
Read the original article Hit count: 278

Filed under:
|

Hi,

I wanted to generate a random number 32 characters in length from a specified set of characters.

For example:

var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
var string_length = 32;

Which would then return a random number of length 32 using the specified characters.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery