Examples of MD5Token


Examples of de.daibutsu.token.Md5Token

  /**
   *
   */
  public TokenDialog(String id) {
    super(JOptionPane.getRootFrame(), "...", true);
    this.md5Token = new Md5Token(id);

    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    this.setTitle("Generate Password");
    this.setSize(new Dimension(220, 110));

View Full Code Here

Examples of de.daibutsu.token.Md5Token

    if (encPass.equals(newRawPass)) {
      /*
       * eingegebenes Token ermitteln
       */
      String rawToken = StringUtils.right(rawPass, Md5Token.TOKEN_LENGTH);
      Md5Token md5Token = (Md5Token) token;
      /*
       * Token prüfen
       */
      return md5Token.isEqualsToken(rawToken);
    }
    return false;
  }
View Full Code Here

Examples of de.daibutsu.token.Md5Token

   */
  public Md5Token getToken() {
    if (StringUtils.isBlank(getUsrToken())) {
      return null;
    }
    return new Md5Token(getUsrToken());
  }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

            properties.clear();

            properties.put("auth_value", "chris");
            properties.put("token_hash", "MD5");

            MD5Token token1 = new MD5Token();
            token1.setValue(properties);

            properties.put("auth_value", "chris");
            properties.put("token_hash", "MD5");

            MD5Token token2 = new MD5Token();
            token2.setValue(properties);

            assertTrue(token1.authenticate(token2, null));
        }catch(Exception failException){
            fail(failException.getMessage());
        }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

            properties.clear();

            properties.put("auth_value", "chris");
            properties.put("token_hash", "MD5");

            MD5Token token1 = new MD5Token();
            token1.setValue(properties);

            properties.put("auth_value", "chrismills");
            properties.put("token_hash", "MD5");

            MD5Token token2 = new MD5Token();
            token2.setValue(properties);

            assertTrue(!token1.authenticate(token2, null));
        }catch(Exception failException){
            fail(failException.getMessage());
        }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

            properties.clear();

            properties.put("auth_value", "chris");
            properties.put("token_hash", "SHA");

            MD5Token token1 = new MD5Token();
            token1.setValue(properties);

            properties.put("auth_value", "chris");
            properties.put("token_hash", "SHA");

            MD5Token token2 = new MD5Token();
            token2.setValue(properties);

            assertTrue(token1.authenticate(token2, null));
        }catch(Exception failException){
            fail(failException.getMessage());
        }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

            properties.clear();

            properties.put("auth_value", "chris");
            properties.put("token_hash", "SHA");

            MD5Token token1 = new MD5Token();
            token1.setValue(properties);

            properties.put("auth_value", "chrismills");
            properties.put("token_hash", "SHA");

            MD5Token token2 = new MD5Token();
            token2.setValue(properties);

            assertTrue(!token1.authenticate(token2, null));
        }catch(Exception failException){
            fail(failException.getMessage());
        }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

     * Uses an MD5 hash type
     * <p/>
     * Test fails if an exception is thrown or authentication fails
     */
    public static void testMD5Token() {
        MD5Token token1=new MD5Token();
        token1.setAuthValue("chris");
        token1.setHashType("MD5");

        MD5Token token2=new MD5Token();
        token2.setAuthValue("chris");
        token2.setHashType("MD5");

        assert token1.authenticate(token2, null);
    }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

     * Uses an MD5 hash type
     * <p/>
     * Test fails if an exception is thrown or authentication passes
     */
    public static void testMD5TokenMismatch() {
        MD5Token token1=new MD5Token();
        token1.setAuthValue("chris");
        token1.setHashType("MD5");

        MD5Token token2=new MD5Token();
        token2.setAuthValue("chrismills");
        token2.setHashType("MD5");

        assert !token1.authenticate(token2, null);
    }
View Full Code Here

Examples of org.jgroups.auth.MD5Token

     * Uses an SHA hash type
     * <p/>
     * Test fails if an exception is thrown or authentication fails
     */
    public static void testSHAToken() {
        MD5Token token1=new MD5Token();
        token1.setAuthValue("chris");
        token1.setHashType("SHA");

        MD5Token token2=new MD5Token();
        token2.setAuthValue("chris");
        token2.setHashType("SHA");

        assert token1.authenticate(token2, null);
    }
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.