code: void checkSecurity(String password) {
  
          I_CmsPasswordHandler handler = OpenCms.getPasswordHandler();
          try {
              handler.validatePassword(password);
              if (handler instanceof I_CmsPasswordSecurityEvaluator) {
                  SecurityLevel level = ((I_CmsPasswordSecurityEvaluator)handler).evaluatePasswordSecurity(password);
                  m_pw.setErrorPassword1(null, OpenCmsTheme.SECURITY + "-" + level.name());
              } else {
                  m_pw.setErrorPassword1(null, OpenCmsTheme.SECURITY_STRONG);
              }
          } catch (CmsSecurityException e) {
              m_pw.setErrorPassword1(
                  new UserError(e.getLocalizedMessage(A_CmsUI.get().getLocale())),
                  OpenCmsTheme.SECURITY_INVALID);
          }
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_pw.getPassword2())) {
              showPasswordMatchError(!password.equals(m_pw.getPassword2()));
          }
      }
docs: Checks the security level of the given password.<p>
  
  @param password the password