Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 7188

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set encryption mode for the document</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="harudoc.setcurrentencoder.html">HaruDoc::setCurrentEncoder</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="harudoc.setinfoattr.html">HaruDoc::setInfoAttr</a></div>
 <div class="up"><a href="class.harudoc.html">HaruDoc</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="harudoc.setencryptionmode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">HaruDoc::setEncryptionMode</h1>
  <p class="verinfo">(PECL haru &gt;= 0.0.1)</p><p class="refpurpose"><span class="refname">HaruDoc::setEncryptionMode</span> &mdash; <span class="dc-title">Set encryption mode for the document</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-harudoc.setencryptionmode-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>HaruDoc::setEncryptionMode</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$key_len</code><span class="initializer"> = 5</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Defines encryption mode for the document. The encryption mode cannot be set
   before setting the password.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-harudoc.setencryptionmode-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">mode</code></em></span>
     <dd>

      <p class="para">
       The encryption mode to use. Can be one of the following:
       <ul class="simplelist">
        <li class="member">
         <strong><code>HaruDoc::ENCRYPT_R2</code></strong> - use &quot;revision2&quot;
         algorithm.
        </li>
        <li class="member">
         <strong><code>HaruDoc::ENCRYPT_R3</code></strong> - use &quot;revision3&quot;
         algorithm. Using this value bumps the version of PDF to 1.4.
        </li>
       </ul>
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">key_len</code></em></span>
     <dd>

      <p class="para">
       The encryption key length in bytes. This parameter is optional and used only
       when mode is <strong><code>HaruDoc::ENCRYPT_R3</code></strong>. The default
       value is 5 (40bit).
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-harudoc.setencryptionmode-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-harudoc.setencryptionmode-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">Throws a <a href="class.haruexception.html" class="classname">HaruException</a> on error.</p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-harudoc.setencryptionmode-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="methodname"><a href="harudoc.setpassword.html" class="methodname" rel="rdfs-seeAlso">HaruDoc::setPassword()</a> - Set owner and user passwords for the document</span></li>
    <li class="member"> <span class="methodname"><a href="harudoc.setpermission.html" class="methodname" rel="rdfs-seeAlso">HaruDoc::setPermission()</a> - Set permissions for the document</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="harudoc.setcurrentencoder.html">HaruDoc::setCurrentEncoder</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="harudoc.setinfoattr.html">HaruDoc::setInfoAttr</a></div>
 <div class="up"><a href="class.harudoc.html">HaruDoc</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>