code: function (cipher, message, password, cfg) {
              // Apply config defaults
              cfg = this.cfg.extend(cfg);
  
              // Derive key and other params
              var derivedParams = cfg.kdf.compute(password, cipher.keySize, cipher.ivSize);
  
              // Add IV to config
              cfg.iv = derivedParams.iv;
  
              // Encrypt
              var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
  
              // Mix in derived params
              ciphertext.mixIn(derivedParams);
  
              return ciphertext;
          }
docs: Encrypts a message using a password.
  
  @param {Cipher} cipher The cipher algorithm to use.
  @param {WordArray|string} message The message to encrypt.
  @param {string} password The password.
  @param {Object} cfg (Optional) The configuration options to use for this operation.
  
  @return {CipherParams} A cipher params object.
  
  @static
  
  @example
  
  var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
  var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });