Package tifauv.jplop.core.auth

Examples of tifauv.jplop.core.auth.SSHAPassword


  /**
   * Test method for raw passwords.
   */
  public void testSetClearPassword()
  throws PasswordException {
    Password psw = new SSHAPassword();
    psw.setPassword("password");
    assertTrue(psw.check("password"));
  }
View Full Code Here


  }
 
 
  public void testSetHashedPassword()
  throws PasswordException {
    Password psw = new SSHAPassword();
    psw.setPassword("{SSHA}VV8wdb4sGLy7Lroi4gxXaj33jCm9tGtP");
    assertTrue(psw.check("LamePassword"));
   
    try {
      psw.setPassword("{SSHA}rg");
      fail("Setting a malformed SSHA password should fail.");
    }
    catch (PasswordException e) {
      // Success
    }
View Full Code Here

  }
 
 
  public void testGetPassword()
  throws PasswordException {
    Password psw = new SSHAPassword();
    assertNull(psw.getPassword());
    assertTrue(psw.check(null));

    psw = new SSHAPassword();
    psw.setPassword("{SSHA}VV8wdb4sGLy7Lroi4gxXaj33jCm9tGtP");
    assertEquals("{SSHA}VV8wdb4sGLy7Lroi4gxXaj33jCm9tGtP", psw.getPassword());
  }
View Full Code Here

TOP

Related Classes of tifauv.jplop.core.auth.SSHAPassword

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.