Skip to content

Doesn't work on simple word #2

Description

@GoogleCodeExporter
I copied the sample code from the wiki page, but used common words like 'i', 
'cool', etc.These words are certainly found in the dictionary but goes 
undetected.

 import com.platinum.dpv.*;

public class checkpwd {                                                         

  public static void main(String[] args) {                                                                                                           
    try {                                                                                                                                            
      DictionaryPasswordValidator pDV = DictionaryPasswordValidator.getInstance();                                                                   
      if (pDV.isPasswordDictionaryBased("cool") == true) {                                                                                           
        System.out.println("Password contains a dictionary word!");                                                                                  
      } else {                                                                                                                                       
        {                                                                                                                                            
          System.out.println("Password is valid.");                                                                                                  
        }                                                                                                                                            
      }                                                                                                                                              
    } catch (Exception e) {                                                                                                                          
      System.out.println("Failed!");                                                                                                                 
    }                                                                                                                                                
  }                                                                                                                                                  
}


Original issue reported on code.google.com by [email protected] on 23 Jun 2012 at 9:46

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions