code: public static String hashPassword(String clearPswd) {
          if (StringUtils.isNotEmpty(clearPswd)) {
              SimpleDigest digest = new SimpleDigest();
              String hashedPswd = digest.digestBase64(clearPswd);
  
              return hashedPswd + PASSWORD_SEP + digest.getBase64Salt();
          } else {
              return null;
          }
      }
docs: Hashes a password using a {@link org.craftercms.commons.crypto.SimpleDigest}. The generated salt is appended
  to the password, using the {@link #PASSWORD_SEP}.
  
  @param clearPswd the password to hash, in clear
  @return the hashed password + {@link #PASSWORD_SEP} + salt