setEditing($editing); } /** * Get editing protection * * @return string */ public function getEditing() { return $this->editing; } /** * Set editing protection * * @param string $editing * @return self */ public function setEditing($editing = null) { $this->editing = $editing; return $this; } /** * Get password * * @return string */ public function getPassword() { return $this->password; } /** * Set password * * @param $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 $spinCount * @return self */ public function setSpinCount($spinCount) { $this->spinCount = $spinCount; return $this; } /** * Get algorithm-sid * * @return int */ public function getMswordAlgorithmSid() { return $this->mswordAlgorithmSid; } /** * Set algorithm-sid (see \PhpOffice\PhpWord\Writer\Word2007\Part\Settings::$algorithmMapping) * * @param $mswordAlgorithmSid * @return self */ public function setMswordAlgorithmSid($mswordAlgorithmSid) { $this->mswordAlgorithmSid = $mswordAlgorithmSid; 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 $salt * @return self * @throws \InvalidArgumentException */ 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; } }