Package com.centraview.common

Examples of com.centraview.common.Password.encrypt()


      }
      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


      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

      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

      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");
        }
View Full Code Here

          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

  {
    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

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.