Package org.owasp.passfault

Examples of org.owasp.passfault.TimeToCrack


   */
  @Test
  public void testGetTimeToCrackNanoSeconds() {
    System.out.println("getTimeToCrackNanoSeconds");
    double crackability = 1;
    TimeToCrack instance = TimeToCrack.GPU1;
    instance.setTestTime(1000000000);
    double expResult = 1000000000;
    double result = instance.getTimeToCrackNanoSeconds(crackability);
    assertEquals(expResult, result, 0.0000000001);
  }
View Full Code Here


   */
  @Test
  public void testGetTimeToCrack_lessThan1Day() {
    System.out.println("getTimeToCrackString");
    double crackability = 2;
    TimeToCrack instance = TimeToCrack.GPU1;
    String expResult = "less than 1 day";
    String result = instance.getTimeToCrackString(crackability);
    assertEquals(expResult, result);
  }
View Full Code Here

    assertEquals(expResult, result);
  }

  private void testTime(int days, String expResult) {
    double crackability = (double) (1 * (double) days * 24 * 60 * 60);
    TimeToCrack instance = TimeToCrack.GPU1;
    instance.setTestTime(1000000000);
    String result = instance.getTimeToCrackString(crackability);
    assertEquals(expResult, result);
  }
View Full Code Here

TOP

Related Classes of org.owasp.passfault.TimeToCrack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.