DevPinoy.org
A Filipino Developers Community
Attention: Site upgrade failed last night. Will resume updates this weekend. Thanks!- Keith

password control - need help.

Latest post 04-29-2008 1:42 AM by modchip. 4 replies.
  • 04-27-2008 10:57 PM

    password control - need help.

    Hey guyz im currently studying vb6 and just wondering if you could help me... well im currently working on a simple log in system and im trying to put some condition when registering the password.

    here's the list of condition:

    1. character must be minimum of 5 and maximum of 12. - (i already got this)

    2. must contained atleast 3 numeric number.

    3. no repeated phrase.

    example: 365coconut = invalid because of the "co"

    4. all of the character must be in lowercase.

     

     

     

     

     

     

    Wars come and go, but my soldier stay eternal.
    • Post Points: 35
  • 04-28-2008 1:25 AM In reply to

    • modchip
    • Top 10 Contributor
    • Joined on 02-09-2006
    • Ivalice
    • Posts 589
    • Points 8,345

    Re: password control - need help.

    Hi!

    I'm not actually a VB programmer, but I looked at your questions and just had a couple of ideas on how I would do it. Remember, these are only suggestions. :D

    2. Must contain 3 numeric characters
    You could test each character, then increment a counter if it encounters a number. After all the characters has been checked, compare the counter if it is greater or equal to 3, then the condition passes.

    3. No repeated phrase.
    Test each character, if the character is a number, skip it, else put it in an array. Append each found character to the array. After all is done, compare the first character with the other characters in array. If there is no match, the condition passes. If it finds a match, get the second character, check with the other characters in the array. If there is a match, the whole condition fails. If no match was found after the second check, then the condition passes.

    4. Lowercase
    I think there a function for checking this. If not, get each character, check its value, (ex: uppercase is 41 to 5A), if it falls under the range of the uppercase characters, then the condition fails, else, continue checking.

    I hope it made sense.

    Filed under:
    • Post Points: 20
  • 04-28-2008 7:08 PM In reply to

    Re: password control - need help.

    yeah sir... i know the logic flow of the case but still i don't know what function will use in this scenario...

    but the lower case i have an idea but still have to check if it will work.. 

     

    Wars come and go, but my soldier stay eternal.
    • Post Points: 5
  • 04-29-2008 1:26 AM In reply to

    • cruizer
    • Top 10 Contributor
    • Joined on 12-14-2005
    • Singapore
    • Posts 896
    • Points 14,740

    Re: password control - need help.

    etong mga ganito magandang i-TDD demo Wink or you can also study regular expressions, like here: http://www.regular-expressions.info/vb.html

    http://devpinoy.org/blogs/cruizer
    Naglalayong buksan at palayain ang kamalayan ng Pinoy .NET developer
    • Post Points: 20
  • 04-29-2008 1:42 AM In reply to

    • modchip
    • Top 10 Contributor
    • Joined on 02-09-2006
    • Ivalice
    • Posts 589
    • Points 8,345

    Re: password control - need help.

    Boss cruizer, tanong ko lang, ano yung "i-TDD demo"? Thanks.

    Filed under:
    • Post Points: 5
Page 1 of 1 (5 items) | RSS

Copyright DevPinoy 2005-2008
Powered by Community Server (Commercial Edition), by Telligent Systems