Re: Random letter and/or number

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38290
interpreted = N
texte = Thanks everyone for two good suggestions. I will try them both :) -- Stuart Tremain IDFK Web Developments stuart@idfk.com.au 101/12 Waters Rd Neutral Bay 2089 Australia Phone +612 9908 2134On Thursday, 30 August 2001, John Peacock wrote: >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 finite >number 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 which >substring to get). Try something like this: > >[text show=F]encrypt_val=[encrypt method=APOP&seed=abcdef]john >peacock[/encrypt][/text] >[math show=F]start=ceil(26*(1-[random]/100))[/math] >Your Password = [getchars >start=[start]&end=[math]start+6[/math]][encrypt_val][/getchars] > > >HTH > >John > >-- >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4720 Boston Way >Lanham, MD 20706 >301-459-3366 x.5010 >fax 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/ >------------------------------------------------------------- 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:

    
  1. Re: Random letter and/or number (Stuart Tremain 2001)
  2. Re: Random letter and/or number (John Peacock 2001)
  3. Re: Random letter and/or number (Marc Frechet 2001)
  4. Re: Random letter and/or number (Kenneth Grome 2001)
  5. Re: Random letter and/or number (Michael Davis 2001)
  6. Random letter and/or number (Stuart Tremain 2001)
Thanks everyone for two good suggestions. I will try them both :) -- Stuart Tremain IDFK Web Developments stuart@idfk.com.au 101/12 Waters Rd Neutral Bay 2089 Australia Phone +612 9908 2134On Thursday, 30 August 2001, John Peacock wrote: >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 finite >number 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 which >substring to get). Try something like this: > >[text show=F]encrypt_val=[encrypt method=APOP&seed=abcdef]john >peacock[/encrypt][/text] >[math show=F]start=ceil(26*(1-[random]/100))[/math] >Your Password = [getchars >start=[start]&end=[math]start+6[/math]][encrypt_val][/getchars] > > >HTH > >John > >-- >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4720 Boston Way >Lanham, MD 20706 >301-459-3366 x.5010 >fax 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/ >------------------------------------------------------------- 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/ Stuart Tremain

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:

question: search return in order (1997) best way to test for the existence of a parameter in a url (2003) Showif, Hideif reverse logic ? (1997) test - WebDNA-Talk-request (2002) New WebCatalog site! (1997) [format 40s]text[/format] doesn't work (1997) Re:[off] Promotions Co? (1997) Grant, please help me ... (1997) customizing the color of user's pages (1997) why is this line in GeneralStore? (1998) Subtotal Not Calculated on Invoice.html (1998) [TaxableTotal] - not working with AOL and IE (1997) WebCatalog 3 to WebDNA under Mac OS X Server 10.4.10: any (2008) Auto entering Friday's date in a field (2002) Dynamically Generated Pages & WC? (2000) forgot the subject - apache/linux8/WC (2002) [WebDNA] Foreign characters (2009) (2009) RE: Answer: WebDelivery downloads alias, not original ? (1997) Secure server question (1997) autosensing lanague selection (1997)