Examples of Password


Examples of Messages.Password

                OKMessage okm=new OKMessage(mwcMain, "File "+fleOpened.getName()+" was not found!");
                okm.setVisible(true);
                okm=null;
                return;
            }
            Password pcPass=new Password(mwcMain);
            pcPass.setVisible(true);
            if(pcPass.getPassword()!=null)
            {
                mwcMain.CloseDatabase();
                Profile prfMain=(new FileReader(fleOpened)).read(pcPass.getPassword());
                if(prfMain!=null)
                {
                    prfMain.resetModifyed();
                    mwcMain.setProfile(prfMain);
                    mwcMain.setOpenedFile(fleOpened);
                    mwcMain.setPassword(pcPass.getPassword());
                }
                else
                {
                    OKMessage okm=new OKMessage(mwcMain, "Incorrect password or broken file!");
                    okm.setVisible(true);
                    okm=null;
                }
            }
            pcPass.erasePass();
            pcPass=null;
        }
        fdOpen=null;
    }
View Full Code Here

Examples of ch.entwine.weblounge.common.security.Password

   */
  @Override
  public boolean equals(Object o) {
    if (!(o instanceof Password))
      return false;
    Password pw = (Password) o;
    DigestType digestType = pw.getDigestType();
    switch (digestType) {
      case md5:
        return md5.equals(pw.getPassword());
      case plain:
        try {
          return md5.equals(DigestUtils.md5(pw.getPassword().getBytes("utf-8")));
        } catch (UnsupportedEncodingException e) {
          throw new IllegalStateException(e);
        }
      default:
        throw new IllegalStateException("Found unknown digest type " + digestType);
View Full Code Here

Examples of com.bleujin.framework.valid.validator.Password

    b.setSvalue("aA_") ;
   
    assertEquals(true, new AlphaNumUnderBar(b, SVALIE).isValid()) ;
    assertEquals(false, new OnlyNumber(b, SVALIE).isValid()) ;
    assertEquals(false, new Password(b, SVALIE).isValid()) ;
    assertEquals(false, new SmallAlphaNum(b, SVALIE).isValid()) ;
    assertEquals(false, new SmallAlphaNumUnderBar(b, SVALIE).isValid()) ;
   
  }
View Full Code Here

Examples of com.centraview.common.Password

        return returnHm;
      }
      HashMap hm = (HashMap) vec.elementAt(0);
      String strPassword = (String) hm.get("Password");

      Password passwordService = Password.getInstance();
      String encryptedPassword = passwordService.encrypt(password);

      if ((strPassword != null) && strPassword.equals(encryptedPassword)) {
        dl.setSql("common.user.details");

        Long lngObj = (Long) hm.get("IndividualID");
View Full Code Here

Examples of com.centraview.common.Password

      cvdl.setSqlQueryToNull();
      cvdl.setSql("user.insertuser");
      cvdl.setString(1, uvo.getLoginName());
      cvdl.setInt(2, uvo.getContactID());
      String userPassword = uvo.getPassword();
      Password passwordService = Password.getInstance();
      String encryptedPassword = passwordService.encrypt(userPassword);
      cvdl.setString(3, encryptedPassword);
      cvdl.setString(4, uvo.getUserStatus());
      cvdl.setString(5, uvo.getUserType());
      cvdl.executeUpdate();
      // insert into userrole
View Full Code Here

Examples of com.centraview.common.Password

      cvdl.setSqlQuery(updateQuery);
      cvdl.setString(queryCount++, uvo.getLoginName());

      if (uvo.getPassword() != null && uvo.getPassword().length() > 0) {
        String updatedPassword = uvo.getPassword();
        Password passwordService = Password.getInstance();
        String encryptedPassword = passwordService.encrypt(updatedPassword);
        cvdl.setString(queryCount++, encryptedPassword);
      }

      cvdl.setString(queryCount++, uvo.getUserStatus());
      cvdl.setString(queryCount++, uvo.getUserType());
View Full Code Here

Examples of com.centraview.common.Password

      Collection col = cvdl.executeQuery();

      HashMap hm = (HashMap) col.iterator().next();

      if (hm != null) {
        Password passwordService = Password.getInstance();

        String dbOldPwd = (String) hm.get("Password");
        String oldEncryptedPassword = passwordService.encrypt(oldPwd);

        if (!dbOldPwd.equals(oldEncryptedPassword)) {
          throw new UserException(UserException.COULDNOT_CHANGE_PASSWORD, "Old password is invalid");
        }

        cvdl.setSql("user.changepwd");

        String newEncryptedPassword = passwordService.encrypt(newPwd);
        cvdl.setString(1, newEncryptedPassword);
        cvdl.setInt(2, userId);
        cvdl.executeUpdate();
      }
    } finally {
View Full Code Here

Examples of com.centraview.common.Password

  public void setNewPassword(int individualId, String newPwd)
  {
    CVDal cvdl = new CVDal(dataSource);
    try {
      Password passwordService = Password.getInstance();
      cvdl.setSql("user.changepwd");
      String newEncryptedPassword = passwordService.encrypt(newPwd);
      cvdl.setString(1, newEncryptedPassword);
      cvdl.setInt(2, individualId);
      cvdl.executeUpdate();
    } finally {
      cvdl.destroy();
View Full Code Here

Examples of com.psddev.dari.util.Password

            }

            user = new ToolUser();
            UserPasswordPolicy userPasswordPolicy = UserPasswordPolicy.Static.getInstance(Settings.get(String.class, "cms/tool/userPasswordPolicy"));
            PasswordPolicy passwordPolicy = null;
            Password hashedPassword;
            if (userPasswordPolicy == null) {
                passwordPolicy = PasswordPolicy.Static.getInstance(Settings.get(String.class, "cms/tool/passwordPolicy"));
            }
            try {
                if (userPasswordPolicy != null || (userPasswordPolicy == null && passwordPolicy == null)) {
View Full Code Here

Examples of com.softwaremill.common.cdi.validation.Password

        assertTrue(oneSpecial, "One special char considered invalid");
        assertTrue(strongPass, "Strong password considered invalid");
    }

    private PasswordValidator initializeValidator(Class<?> classWithAnnotation) throws NoSuchFieldException {
        Password constraint = classWithAnnotation.getField("field").getAnnotation(Password.class);
        PasswordValidator validator = new PasswordValidator();
        validator.initialize(constraint);

        return validator;
    }
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.