<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.phardata.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'phardata.setsignaturealgorithm.php',
    1 => 'PharData::setSignatureAlgorithm',
    2 => 'Set the signature algorithm for a phar and apply it',
  ),
  'up' => 
  array (
    0 => 'class.phardata.php',
    1 => 'PharData',
  ),
  'prev' => 
  array (
    0 => 'phardata.setmetadata.php',
    1 => 'PharData::setMetadata',
  ),
  'next' => 
  array (
    0 => 'phardata.setstub.php',
    1 => 'PharData::setStub',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/PharData/setSignatureAlgorithm.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="phardata.setsignaturealgorithm" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">PharData::setSignatureAlgorithm</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">PharData::setSignatureAlgorithm</span> &mdash; <span class="dc-title">Set the signature algorithm for a phar and apply it</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-phardata.setsignaturealgorithm-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>PharData::setSignatureAlgorithm</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$algo</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$privateKey</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
 <p class="para">
  Diese Methode des <span class="classname"><a href="class.phar.php" class="classname">Phar</a></span>-Objekts funktioniert nur
  wenn die <var class="filename">php.ini</var>-Einstellung <code class="literal">phar.readonly</code> auf 0
  gesetzt ist, sonst wird eine <span class="classname"><a href="class.pharexception.php" class="classname">PharException</a></span> geworfen.
 </p>
</p></blockquote>

  <p class="para">
   Set the signature algorithm for a phar and apply it.  The
   signature algorithm must be one of <code class="literal">Phar::MD5</code>,
   <code class="literal">Phar::SHA1</code>, <code class="literal">Phar::SHA256</code>,
   <code class="literal">Phar::SHA512</code>, or <code class="literal">Phar::OPENSSL</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-phardata.setsignaturealgorithm-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">algo</code></dt>
     <dd>
      <p class="para">
       One of <code class="literal">Phar::MD5</code>,
   <code class="literal">Phar::SHA1</code>, <code class="literal">Phar::SHA256</code>,
   <code class="literal">Phar::SHA512</code>, or <code class="literal">Phar::OPENSSL</code>
      </p>
     </dd>
    
   </dl>
  </p>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-phardata.setsignaturealgorithm-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Es wird kein Wert zurückgegeben.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-phardata.setsignaturealgorithm-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   Throws <span class="classname"><a href="class.unexpectedvalueexception.php" class="classname">UnexpectedValueException</a></span> for many errors,
   <span class="classname"><a href="class.badmethodcallexception.php" class="classname">BadMethodCallException</a></span> if called for a zip- or
   a tar-based phar archive, and a <span class="classname"><a href="class.pharexception.php" class="classname">PharException</a></span>
   if any problems occur flushing changes to disk.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-phardata.setsignaturealgorithm-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">privateKey</code> is now nullable.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-phardata.setsignaturealgorithm-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="phar.getsupportedsignatures.php" class="function" rel="rdfs-seeAlso">Phar::getSupportedSignatures()</a> - Return array of supported signature types</span></li>
    <li><span class="function"><a href="phar.getsignature.php" class="function" rel="rdfs-seeAlso">Phar::getSignature()</a> - Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>