IPasswordGenerator pwdgen = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_ALLPRINTABLE); String pwd = pwdgen.getNewPassword(12, 16);
236123622363236423652366236723682369237023712372
} 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); }
125126127128129130131132133134135136
* @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);
206207208209210211212213214215216217
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()); }
348349350351352353354355356357358359
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;
112113114115116117118119120
} return ret; } private String getRandomString(int length) { IPasswordGenerator gen = PasswordGeneratorFactory.getInstance(params.getRandomGeneratorType()); String ret = gen.getNewPassword(length, length); return ret; }