Package tifauv.jplop.core.auth

Examples of tifauv.jplop.core.auth.SSHAPassword.check()


   */
  public void testSetClearPassword()
  throws PasswordException {
    Password psw = new SSHAPassword();
    psw.setPassword("password");
    assertTrue(psw.check("password"));
  }
 
 
  public void testSetHashedPassword()
  throws PasswordException {
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.");
    }
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
Copyright © 2018 www.massapi.com. 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.