Results 1 to 3 of 3
  1.    #1  
    Hey guys, I need to generate a random 32 digit alphanumeric number for a new app. Anyone do this before?

    Thanks

    David
    --
    twitter: cybler
    app: nearMe
    Last edited by dbarkman; 07/06/2010 at 01:01 AM. Reason: Solved
  2.    #2  
    The following is working great!

    Code:
    FirstAssistant.prototype.setup = function() {
        var randomnumber = this.generateRand(32);
    };
    
    FirstAssistant.prototype.generateRand = function(length) {
    
        var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
        var pass = "";
    
        for(var x=0; x<length; x++) {
            var i = Math.floor(Math.random() * 62);
            pass += chars.charAt(i);
        }
    
        return pass;
    };
  3. rand0m1's Avatar
    Posts
    12 Posts
    Global Posts
    13 Global Posts
    #3  
    Are there any shortcuts to the alphanumeric - like regex classes?

Posting Permissions