Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.ByteString


    DictionaryPasswordValidator validator =
         new DictionaryPasswordValidator();
    validator.initializePasswordValidator(configuration);

    ByteString pwOS = ByteString.valueOf(password);
    ArrayList<Modification> mods = new ArrayList<Modification>();
    mods.add(new Modification(ModificationType.REPLACE,
        Attributes.create("userpassword", password)));

    InternalClientConnection conn =
View Full Code Here


    StringBuilder buffer = new StringBuilder();
    for (int i=0; i < 20; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

    HashSet<ByteString> currentPassword = new HashSet<ByteString>(3);
    currentPassword.add(ByteString.valueOf("xxx"));
    for (int i=0; i < 7; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

    return new Object[][] {};
  }

  private Object[] generateValues(String password) throws Exception
  {
    ByteString bytePassword = ByteString.valueOf(password);
    SaltedMD5PasswordStorageScheme scheme = new SaltedMD5PasswordStorageScheme();

    ConfigEntry configEntry =
       DirectoryServer.getConfigEntry(
           DN.decode("cn=Salted MD5,cn=Password Storage Schemes,cn=config"));

    SaltedMD5PasswordStorageSchemeCfg configuration =
      AdminTestCaseUtils.getConfiguration(
          SaltedMD5PasswordStorageSchemeCfgDefn.getInstance(),
          configEntry.getEntry()
          );

    scheme.initializePasswordStorageScheme(configuration);

    ByteString encodedAuthPassword = scheme.encodeAuthPassword(bytePassword);
    StringBuilder[] authPWComponents =
         AuthPasswordSyntax.decodeAuthPassword(
              encodedAuthPassword.toString());

     return new Object[] {
         AUTH_PASSWORD_SCHEME_NAME_SALTED_MD5 + "$"
                 + authPWComponents[1].toString()
                 + "$"+ authPWComponents[2].toString(),
View Full Code Here

  public void testStringPrepNoCaseFold(String value1,
                             String value2, Boolean result) throws Exception
  {
    //Take any caseExact matching rule.
    EqualityMatchingRule rule = new CaseExactIA5EqualityMatchingRule();
    ByteString normalizedValue1 =
      rule.normalizeValue(ByteString.valueOf(value1));
    ByteString normalizedValue2 =
      rule.normalizeValue(ByteString.valueOf(value2));

    Boolean liveResult = rule.areEqual(normalizedValue1, normalizedValue2);
    assertEquals(result, liveResult);
  }
View Full Code Here

  public void testStringPrepWithCaseFold(String value1,
                             String value2, Boolean result) throws Exception
  {
    //Take any caseExact matching rule.
    EqualityMatchingRule rule = new CaseIgnoreEqualityMatchingRule();
    ByteString normalizedValue1 =
      rule.normalizeValue(ByteString.valueOf(value1));
    ByteString normalizedValue2 =
      rule.normalizeValue(ByteString.valueOf(value2));

    Boolean liveResult = rule.areEqual(normalizedValue1, normalizedValue2);
    assertEquals(result, liveResult);
  }
View Full Code Here

    StringBuilder buffer = new StringBuilder();
    for (int i=0; i < 20; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

    StringBuilder buffer = new StringBuilder();
    for (int i=0; i < 20; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

    StringBuilder buffer = new StringBuilder();
    for (int i=0; i < 20; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

    StringBuilder buffer = new StringBuilder();
    for (int i=0; i < 20; i++)
    {
      buffer.append('x');
      ByteString password = ByteString.valueOf(buffer.toString());

      ArrayList<Modification> mods = new ArrayList<Modification>();
      mods.add(new Modification(ModificationType.REPLACE,
          Attributes.create("userpassword",
                                              buffer.toString())));
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.ByteString

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.