Random number generation and passwords (OpenInsight 32-bit Specific)
At 07 JUN 2005 06:40:11PM Kauko Laurinolli wrote:
I am attempting to generate passwords for the users using Rnd() function but following results just same numbers again and again?
InitRnd Time():Date()
random_num=Rnd(100) + 1
How can I random 4-5 letter passwords (sensible words) generated in OI?
At 07 JUN 2005 07:03PM Warren Auyong wrote:
Here's what I did:
I searched the web and found some databases of words for crossword puzzle generators, imported that into ARev and then selected words within a number of letter range (4 to 5 in your case). I manually went through this sublist and deleted any "off-color" words. I then created a wordlist file with a structure similar to the LISTS file to get around the 64K limit in ARev. To generate a password I'd take a random number 1 to x where x is the number of records in the wordlist file, read words*x and then randomly pick a word out of the @FM sublist of words. If it was the same as the old password, draw again. I'd then attach a 4 digit random number to the word and email it to the user.
I never use the random seed function unless I need to repeat a random sequence of numbers.
At 08 JUN 2005 08:20AM Sean FitzSimons wrote:
Kauko,
What happens if you remove the InitRnd statement?
Sean
At 08 JUN 2005 06:49PM Kauko Laurinolli wrote:
You are right, now it works.
Only if I could find a link to "databases of words for crossword puzzle generators". No luck in finding free ones so far.
At 09 JUN 2005 01:19PM Warren Auyong wrote:
It took me a while to find one, I don't remember where I got it from. I can always email you the file I imported into ARev prior to trimming it down, if I still have it.
At 10 JUN 2005 03:08AM Simon G Wilmot wrote:
I have a database of words for crossword solving, XWord, I can e-mail that to you if you want ??
Simon
At 10 JUN 2005 05:01AM Kauko Laurinolli wrote:
Thank you very much.