Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need suggestions for not so random number
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01084023
Message ID:
01084119
Views:
11
Dmitry,

I see, I thought you'll give the nSeed as a key to the user and in your program you compared with the actual value, for example if you gave to the user 382622 (You can even disguise it as 'AB38-26CD-2BX2' where all letters are random and you clear them out) and then in your registration program you test (very crude) if int(rand(tnSeed) * 1000000) = 740233 && Valid Key

Anyways, I do not think this is a good solution, Craig's is much better

>Thank you for your suggestion. The fact that the rand(nseed) returns the same number is the problem for me, since I have to show this "returned number" to the user.
>
>I am working on how to use the method suggested by Sergey and developed by Craig. It looks, so far, very good. My only concern is that if 6 months later Craig finds a bug in his code (and obviously I won't know about it) I can be potentially stuck with a big problem.
>
>Again, thank you.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform