Link | xs_genPwd |
Author | Jonathan Guthrie |
Category | Custom Tag |
Version | 8.x |
License | http://creativecommons.org/licenses/by/2.5/ |
Posted | 18 Sep 2012 |
Updated | 18 Sep 2012 |
More by this author... |
Generates a random password of a given size.
local('newPassword' = xs_genPwd(-size=20));
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag('genPwd', -Optional='size', -Type='integer',-namespace='xs_'); (!(local('size')))? local('size' = 8); local('pMap' = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0')); local('thisPwd' = ''); loop(#size); #thisPwd += #pMap->get(Math_Random(-min=1,-max=(#pMap->size))); /loop; return(@#thisPwd); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft