Re: Random letter and/or number
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 38248
interpreted = N
texte = Stuart Tremain wrote:> > I am familiar with the [random] tag, but is there a method for creating a random alphanumeric sequence such as:> > g39hys> > To be used for randomly generated passwords etc?Note, that random generation does not preclude simple returns, i.e.AAAAA, etc. Nor does it preclude the same response returned a finitenumber of times.You could use the [encrypt method=APOP] context on some other value, like part of their username. This will have all appearances of a random collection of characters. This will return more characters that you will probably want to use, so just use [middle] to get a chunk out of the middle (you can even use [random] to choose whichsubstring to get). Try something like this:[text show=F]encrypt_val=[encrypt method=APOP&seed=abcdef]johnpeacock[/encrypt][/text][math show=F]start=ceil(26*(1-[random]/100))[/math]Your Password = [getcharsstart=[start]&end=[math]start+6[/math]][encrypt_val][/getchars]HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Stuart Tremain wrote:> > I am familiar with the [random] tag, but is there a method for creating a random alphanumeric sequence such as:> > g39hys> > To be used for randomly generated passwords etc?Note, that random generation does not preclude simple returns, i.e.AAAAA, etc. Nor does it preclude the same response returned a finitenumber of times.You could use the [encrypt method=APOP] context on some other value, like part of their username. This will have all appearances of a random collection of characters. This will return more characters that you will probably want to use, so just use [middle] to get a chunk out of the middle (you can even use [random] to choose whichsubstring to get). Try something like this:[text show=F]encrypt_val=[encrypt method=APOP&seed=abcdef]johnpeacock[/encrypt][/text][math show=F]start=ceil(26*(1-[random]/100))[/math]Your Password = [getcharsstart=[start]&end=[math]start+6[/math]][encrypt_val][/getchars]HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
John Peacock
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Great product and great job ! (1997)
Formulas (2001)
Using Plug-In while running 1.6.1 (1997)
Generating unique SKU from [cart] - FIXED! (1997)
RE: Can a database get stomped by simultaneous access? (1997)
ShowNext truncating passed variable?? (1997)
protect tag on NT (1997)
question: back button prevention (1997)
Large databases in WebCat (1997)
Installation webCatalog (French speakers please help) (1998)
docs for WebCatalog2 (1997)
[CART] (1997)
Server crashes and triggers . . . are they linked? (2001)
Showif, Hideif reverse logic ? (1997)
Assigning new CART number (1997)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
Hiding HTML and breaking the page (1997)
Search/sort in URL Was: GuestBook example (1997)
RE: Signal Raised (1997)
Interpreting WebDNA in javascript (2006)