Examples of IPasswordGenerator


Examples of org.ejbca.util.passgen.IPasswordGenerator

    }

    private void setUserDataVOWS(UserDataVOWS userdata) {
      userdata.setStatus(UserDataVOWS.STATUS_NEW);
      if (userdata.getPassword() == null) {
        final IPasswordGenerator pwdgen = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_ALLPRINTABLE);
      final String pwd = pwdgen.getNewPassword(12, 12);                 
        userdata.setPassword(pwd);
      }
      userdata.setClearPwd(false);
      userdata.setTokenType(UserDataVOWS.TOKEN_TYPE_USERGENERATED);
    }
View Full Code Here

Examples of org.ejbca.util.passgen.IPasswordGenerator

     * @return the new password or null of operation failed.
     */
  private String setUserStatusToNew(UserDataVO userdata) {
    String retval = null;
    try {
      IPasswordGenerator passwordGenerator = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_LETTERSANDDIGITS);
      String password= passwordGenerator.getNewPassword(8, 8);

      userdata.setStatus(UserDataConstants.STATUS_NEW);
      userdata.setPassword(password);

      userAdminSession.changeUser(raAdmin, userdata, true);
View Full Code Here

Examples of org.ejbca.util.passgen.IPasswordGenerator

            ei.setCertificateSerialNumber(submessage.getCertificateSerialNumber());
            result.setExtendedinformation(ei);
        }
   
      if (submessage.getPassword() == null) {
        final IPasswordGenerator pwdgen = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_ALLPRINTABLE);
      final String pwd = pwdgen.getNewPassword(12, 12);                 
        result.setPassword(pwd);
      } else {
        result.setPassword(submessage.getPassword());
      }
     
View Full Code Here

Examples of org.ejbca.util.passgen.IPasswordGenerator

      final String pwd;
      if (StringUtils.equals(this.userPwdParams, "random")) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting 12 char random user password.");
        }
        final IPasswordGenerator pwdgen = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_ALLPRINTABLE);
        pwd = pwdgen.getNewPassword(12, 12);                                                                   
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting fixed user password from config.");
        }
        pwd = this.userPwdParams;                                                                   
View Full Code Here

Examples of org.ejbca.util.passgen.IPasswordGenerator

    }
    return ret;
  }
 
  private String getRandomString(int length) {
    IPasswordGenerator gen = PasswordGeneratorFactory.getInstance(params.getRandomGeneratorType());
    String ret = gen.getNewPassword(length, length);   
    return ret;
  }
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.