Difference between revisions of "Random Password Generator"

From Second Life Wiki
Jump to navigation Jump to search
(New page: Code: <lsl> //Easy Random Password Generator with Password Length. // // - Created by Jor3l Boa - // // Available under the Creative Commons Attribution-ShareAlike 2.5 license // http://cr...)
 
Line 1: Line 1:
Code:
Code:
<lsl>
<lsl>
//Easy Random Password Generator with Password Length.
// Generate Passwords based on String length
// Free to use, share and remix.
//
//
// - Created by Jor3l Boa -
// http://foravatars.com
//
// Available under the Creative Commons Attribution-ShareAlike 2.5 license
// http://creativecommons.org/licenses/by-sa/2.5/
//
// http://sltools.biz





Revision as of 08:33, 25 September 2010

Code: <lsl> // Generate Passwords based on String length // Free to use, share and remix. // // http://foravatars.com


string randomPass(integer length) {

   string letters = "abcdefghijkmnopqrstuvwxyz234567890";
   string rPass;
   while(llStringLength(rPass) < length)   {
       integer rand = llFloor(llFrand(llStringLength(letters)));
       rPass += llGetSubString(letters,rand,rand);
   }
   return rPass;

}

default {

   state_entry()
   {
       llSay(0,randomPass(10));
   }

} </lsl>