Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Autenticate trouble
Message
De
20/11/2007 09:38:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Autenticate trouble
Divers
Thread ID:
01270153
Message ID:
01270153
Vues:
44
I have the following problem when I authenticate to the server based on a user and password stored in my own table I get an incorrect password when I have the Romanian language pack installed on the client desktop but I mention that I have made sure that the EN as language is selected and it still does not work ... and I do not understand why.

This is the routine that encrypts the password:
LPARAMETERS ;
	tcString, ;
	tlEncrypt

LOCAL ;
	lnI, ;
	lcReturnString, ;
	lcString1, ;
	lcString2, ;
	lcTempString, ;
	lcCharacter, ;
	lnPos

lcString1 = ""
FOR lnI = 0 TO 255
	lcString1 = lcString1 + CHR(lnI)
NEXT

lcTempString = lcString1
lcString2 = ""
FOR lnI = 1 TO 32
	IF MOD( lnI, 2 ) = 0
		lcString2 = lcString2 + LEFT( lcTempString, 8 )
		IF LEN(lcTempString) >= 9
			lcTempString = SUBSTR( lcTempString, 9 )
		ENDIF
	ELSE
		lcString2 = lcString2 + RIGHT( lcTempString, 8 )
		lcTempString = LEFT( lcTempString, LEN( lcTempString ) - 8 )
	ENDIF
NEXT

lcReturnString = ""
FOR lnI = 1 TO LEN(tcString)
	lcCharacter = SUBSTR(tcString, lnI, 1)
	IF tlEncrypt
		lnPos = AT(lcCharacter, lcString1) + lnI - 1
		IF lnPos > 256
			lnPos = lnPos - 256
		ENDIF
		lcReturnString = lcReturnString + SUBSTR(lcString2, lnPos, 1)
	ELSE
		lnPos = AT(lcCharacter, lcString2) - lnI + 1
		IF lnPos < 1
			lnPos = lnPos + 256
		ENDIF
		lcReturnString = lcReturnString + SUBSTR(lcString1, lnPos, 1)
	ENDIF
NEXT
RETURN lcReturnString
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform