setEditing($editing); } } /** * Get editing protection. * * @return string */ public function getEditing() { return $this->editing; } /** * Set editing protection. * * @param string $editing Any value of \PhpOffice\PhpWord\SimpleType\DocProtect * * @return self */ public function setEditing($editing = null) { DocProtect::validate($editing); $this->editing = $editing; return $this; } /** * Get password. * * @return string */ public function getPassword() { return $this->password; } /** * Set password. * * @param string $password * * @return self */ public function setPassword($password) { $this->password = $password; return $this; } /** * Get count for hash iterations. * * @return int */ public function getSpinCount() { return $this->spinCount; } /** * Set count for hash iterations. * * @param int $spinCount * * @return self */ public function setSpinCount($spinCount) { $this->spinCount = $spinCount; return $this; } /** * Get algorithm. * * @return string */ public function getAlgorithm() { return $this->algorithm; } /** * Set algorithm. * * @param string $algorithm * * @return self */ public function setAlgorithm($algorithm) { $this->algorithm = $algorithm; return $this; } /** * Get salt. * * @return string */ public function getSalt() { return $this->salt; } /** * Set salt. Salt HAS to be 16 characters, or an exception will be thrown. * * @param string $salt * * @return self */ public function setSalt($salt) { if ($salt !== null && strlen($salt) !== 16) { throw new InvalidArgumentException('salt has to be of exactly 16 bytes length'); } $this->salt = $salt; return $this; } }