test/org/ohmage/test/ParameterSets.java
private static void initPasswords() {
    // Check the minimum length.
    validPlainTextPasswords.add("aaAA00..");
    // Check the maximum length.
    validPlainTextPasswords.add("aaaaAAAA0000....");
    // Check all of the valid characters.
    validPlainTextPasswords.add("abcdefghijkl");
    validPlainTextPasswords.add("mnopqrstuvwx");
    validPlainTextPasswords.add("yz0123456789");
    validPlainTextPasswords.add("`~!@#$%^&*()");
    validPlainTextPasswords.add("-_=+[{]}\\|;");
    validPlainTextPasswords.add(":'\",<.>/?");

    // Too short.
    invalidPlainTextPasswords.add("aA.4567");

    // Test all valid characters.
    validHashedPasswords.add("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456");
    validHashedPasswords.add("789.$6789012345678901234567890123456789012345678901234567890");

    // Too short.
    invalidHashedPasswords.add("12345678901234567890123456789012345678901234567890123456789");
    // Too long.
    invalidHashedPasswords.add("1234567890123456789012345678901234567890123456789012345678901");

    System.out.println("Valid plain text passwords generated:");
    for (String validPassword : validPlainTextPasswords) {
      System.out.println("\t" + validPassword);
    }
    System.out.println();

    System.out.println("Invalid plain text passwords generated:");
    for (String invalidPassword : invalidPlainTextPasswords) {
      System.out.println("\t" + invalidPassword);
    }
    System.out.println();

    System.out.println("Valid hashed passwords generated:");
    for (String validHashedPassword : validHashedPasswords) {
      System.out.println("\t" + validHashedPassword);
    }
    System.out.println();

    System.out.println("Invalid hashed passwords generated:");
    for (String invalidHashedPassword : invalidHashedPasswords) {
      System.out.println("\t" + invalidHashedPassword);
    }
    System.out.println();
  }
/**
   * Populates the valid and invalid password lists.
   */
Populates the valid and invalid password lists.
Populates the valid and invalid password lists .
private static void initPasswords() {
    validPlainTextPasswords.add("aaAA00..");
    validPlainTextPasswords.add("aaaaAAAA0000....");
    validPlainTextPasswords.add("abcdefghijkl");
    validPlainTextPasswords.add("mnopqrstuvwx");
    validPlainTextPasswords.add("yz0123456789");
    validPlainTextPasswords.add("`~!@#$%^&*()");
    validPlainTextPasswords.add("-_=+[{]}\\|;");
    validPlainTextPasswords.add(":'\",<.>/?");
    invalidPlainTextPasswords.add("aA.4567");
    validHashedPasswords.add("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456");
    validHashedPasswords.add("789.$6789012345678901234567890123456789012345678901234567890");
    invalidHashedPasswords.add("12345678901234567890123456789012345678901234567890123456789");
    invalidHashedPasswords.add("1234567890123456789012345678901234567890123456789012345678901");
    System.out.println("Valid plain text passwords generated:");
    for (String validPassword : validPlainTextPasswords) {
      System.out.println("\t" + validPassword);
    }
    System.out.println();
    System.out.println("Invalid plain text passwords generated:");
    for (String invalidPassword : invalidPlainTextPasswords) {
      System.out.println("\t" + invalidPassword);
    }
    System.out.println();
    System.out.println("Valid hashed passwords generated:");
    for (String validHashedPassword : validHashedPasswords) {
      System.out.println("\t" + validHashedPassword);
    }
    System.out.println();
    System.out.println("Invalid hashed passwords generated:");
    for (String invalidHashedPassword : invalidHashedPasswords) {
      System.out.println("\t" + invalidHashedPassword);
    }
    System.out.println();
  }
private static void initPasswords ( ) { validPlainTextPasswords . add ( "aaAA00.." ) ; validPlainTextPasswords . add ( "aaaaAAAA0000...." ) ; validPlainTextPasswords . add ( "abcdefghijkl" ) ; validPlainTextPasswords . add ( "mnopqrstuvwx" ) ; validPlainTextPasswords . add ( "yz0123456789" ) ; validPlainTextPasswords . add ( "`~!@#$%^&*()" ) ; validPlainTextPasswords . add ( "-_=+[{]}\\|;" ) ; validPlainTextPasswords . add ( ":'\",<.>/?" ) ; invalidPlainTextPasswords . add ( "aA.4567" ) ; validHashedPasswords . add ( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456" ) ; validHashedPasswords . add ( "789.$6789012345678901234567890123456789012345678901234567890" ) ; invalidHashedPasswords . add ( "12345678901234567890123456789012345678901234567890123456789" ) ; invalidHashedPasswords . add ( "1234567890123456789012345678901234567890123456789012345678901" ) ; System . out . println ( "Valid plain text passwords generated:" ) ; for ( String validPassword : validPlainTextPasswords ) { System . out . println ( "\t" + validPassword ) ; } System . out . println ( ) ; System . out . println ( "Invalid plain text passwords generated:" ) ; for ( String invalidPassword : invalidPlainTextPasswords ) { System . out . println ( "\t" + invalidPassword ) ; } System . out . println ( ) ; System . out . println ( "Valid hashed passwords generated:" ) ; for ( String validHashedPassword : validHashedPasswords ) { System . out . println ( "\t" + validHashedPassword ) ; } System . out . println ( ) ; System . out . println ( "Invalid hashed passwords generated:" ) ; for ( String invalidHashedPassword : invalidHashedPasswords ) { System . out . println ( "\t" + invalidHashedPassword ) ; } System . out . println ( ) ; }
Populates the valid and invalid password lists.
Populates the valid and invalid password lists .
// Check the minimum length. // Check the maximum length. // Check all of the valid characters. // Too short. // Test all valid characters. // Too short. // Too long.