I have a Password Reset Functionality ,I have to check whether Old and New Passwords are
similar, If similar or same through error .
If,
Old Password : BradPitt
New Password :JohnPitt
Here passwords are similar
What I have to do is, I have to check whether PASSWORDS ARE ATLEAST 50% SIMILAR. in ASP.NET
This can get very complicated. It all depends on how you define “similar”. Once you have that, the rest becomes easier.
Here it may mean: a password is seen as similar if it starts with or ends with the same sequence of at least n characters (say, 4) than the previous one.
Or it may mean: if you count +1 for every place where the character in the old password is the same as in the new password, and have at least 50% of the number of characters the same. In that case, “BradPitt” and “JohnPitt” would be similar, but “BradPitt” and “McDonaldPitt” would not.
So the first thing to do is to define similarity. Implementing it then becomes a snap.
Good luck!