Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Store encrypted strings
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Store encrypted strings
Divers
Thread ID:
00961816
Message ID:
00961816
Vues:
42
I'm encrypting passwords using the Crypto API and checking them upon login with a SQL string like this:
lcUserPass = THIS.EncryptPasswd(PADR(lcUserPass,20))
Server.oSqlConn.cSql = [SELECT CPAUsers.* FROM CPAUsers ] + ;
	[INNER JOIN CPAOrgs ON CPAUsers.OrgCode = CPAOrgs.OrgCode ] + ;
	[WHERE (LOWER(CPAUsers.UserEmail) = '] + lcUserID + [') ] + ;
	[AND (CPAUsers.OrgCode = '] + lcOrgCode + [') AND ] + ;
	[(CPAUsers.UserPass = ']+lcUserPass+[') AND (CPAUsers.Active = 1) AND (CPAOrgs.Active = 1)]
It appears that sometimes the Crypto API generates an encrypted string that causes a SQL error.

What can I do either in syntax or in database structure to avoid this problem?

TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform