Comparing Strings
Written by Eric Smith, Northstar Computer Systems LLC
A common question I get deals with checking passwords against each other (in a confirmation mode, for instance) or against a stored password. One key thing you have to decide when doing this is whether case is important or not. Some systems I've used are case sensitive, others aren't. If you have decided to not check case when checking a password, be sure to either lowercase both values (LCase) or uppercase them (UCase). That way you're comparing "apples to apples", so to speak. Otherwise, a mix of capital letters will cause the values never to compare properly.
Another key thing to remember is that if you're checking or not checking case, be sure to let the user know. This makes it clearer to them what is going to happen.
Keywords: [
Security
|
Strings
]
Publication Date: 10/1/2000
|