Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shuffle PIN
Message
 
 
À
27/06/2005 02:19:27
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MySQL
Divers
Thread ID:
01025682
Message ID:
01026660
Vues:
20
This message has been marked as the solution to the initial question of the thread.
You can generate PINs randomly
CREATE CURSOR PINs (Pin I)
INDEX ON PIN TAG PIN
lnPins2Gen = 1000
lnPinMin = 10001
lnPinMax = 19999
RAND(-1)
DO WHILE RECCOUNT("PINs") < lnPins2Gen
	lnPin = RandInt(lnPinMin, lnPinMax)
	IF NOT SEEK(lnPin, "PINs", "PIN")
		INSERT INTO PINs VALUES (lnPin)
	ENDIF
ENDDO 
RETURN 

FUNCTION RandInt
PARAMETER tnLower, tnUpper
LOCAL lnRetVal
lnRetVal = int((tnUpper - tnLower + 1)*rand() + tnLower)
RETURN IIF( BETWEEN(lnRetVal, tnLower, tnUpper), lnRetVal, tnUpper)
>I think its like modulus example when I specify the 1000
>it will create 1000 number that with a 4 digit number.
>
>ex.
> 10012
> 10026
> 10031
> and so on...
>
>they said its modulus but is there another way that they will be almost imposible to detect the formula?
>
>I hope you get what I mean.
>Thanks a lot
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform