Last active
August 29, 2015 14:13
-
-
Save dawesi/83b78c5a7975d88a35bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string function createRandomString() | |
{ | |
var rules = { minLength = 8, maxLength = 12 }; | |
var length = randRange(rules.minLength,rules.maxLength,'SHA1PRNG'); | |
var passwd = ['2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','J','K','M','N','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','j','k','m','n','p','q','r','s','t','u','v','w','x','y','z','##','@','$','&','*','+']; | |
createObject('java','java.util.Collections').shuffle(passwd); | |
return arrayToList(arraySlice(passwd,1,length),''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment