<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mcrypt.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.mcrypt-get-key-size.php',
    1 => 'mcrypt_get_key_size',
    2 => 'Gets the key size of the specified cipher',
  ),
  'up' => 
  array (
    0 => 'ref.mcrypt.php',
    1 => 'Mcrypt Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.mcrypt-get-iv-size.php',
    1 => 'mcrypt_get_iv_size',
  ),
  'next' => 
  array (
    0 => 'function.mcrypt-list-algorithms.php',
    1 => 'mcrypt_list_algorithms',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mcrypt/functions/mcrypt-get-key-size.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mcrypt-get-key-size" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mcrypt_get_key_size</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7 &lt; 7.2.0, PECL mcrypt &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">mcrypt_get_key_size</span> &mdash; <span class="dc-title">Gets the key size of the specified cipher</span></p>

 </div>
 <div id="function.mcrypt-get-key-size-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warnung</strong><p class="simpara">Diese Funktion wurde
in PHP 7.1.0 als <em>DEPRECATED</em> (veraltet) markiert und wurde in PHP 7.2.0 <em>ENTFERNT</em>. Von der Verwendung dieser
Funktion wird dringend abgeraten.</p></div>
 </div>
 <div class="refsect1 description" id="refsect1-function.mcrypt-get-key-size-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mcrypt_get_key_size</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$cipher</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <div class="methodsynopsis dc-description"><span class="methodname"><strong>mcrypt_get_key_size</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$cipher</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$mode</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   The first prototype is when linked against libmcrypt 2.2.x, the
   second when linked against libmcrypt 2.4.x or 2.5.x.
  </p>
  <p class="simpara">
   <span class="function"><strong>mcrypt_get_key_size()</strong></span> is used to get the size
   of a key of the specified <code class="parameter">cipher</code> (in
   combination with an encryption mode).
  </p>
  <p class="simpara">
   It is more useful to use the <span class="function"><a href="function.mcrypt-enc-get-key-size.php" class="function">mcrypt_enc_get_key_size()</a></span>
   function as this uses the resource returned by <span class="function"><a href="function.mcrypt-module-open.php" class="function">mcrypt_module_open()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mcrypt-get-key-size-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">cipher</code></dt>
    <dd>
     <p class="para">Eine der Konstanten von <strong><code>MCRYPT_ciphername</code></strong> oder der Name eines Algorithmus als Zeichenkette.</p>
    </dd>
   
   
    <dt><code class="parameter">mode</code></dt>
    <dd>
     <p class="para">Eine der <strong><code>MCRYPT_MODE_modename</code></strong>-Konstanten oder eine der folgenden Zeichenketten: &quot;ecb&quot;, &quot;cbc&quot;, &quot;cfb&quot;, &quot;ofb&quot;, &quot;nofb&quot; oder &quot;stream&quot;.</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mcrypt-get-key-size-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns the maximum supported key size of the algorithm in bytes
   Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mcrypt-get-key-size-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>mcrypt_get_key_size()</strong></span> Example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />    </span><span style="color: #007700">echo </span><span style="color: #0000BB">mcrypt_get_key_size</span><span style="color: #007700">(</span><span style="color: #DD0000">'tripledes'</span><span style="color: #007700">, </span><span style="color: #DD0000">'ecb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
    The example above shows how to use this function when
    linked against libmcrypt 2.4.x or 2.5.x.
   </p></div>
   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">24</pre>
</div>
   </div>
  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.mcrypt-get-key-size-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mcrypt-get-block-size.php" class="function" rel="rdfs-seeAlso">mcrypt_get_block_size()</a> - Gets the block size of the specified cipher</span></li>
   <li><span class="function"><a href="function.mcrypt-enc-get-key-size.php" class="function" rel="rdfs-seeAlso">mcrypt_enc_get_key_size()</a> - Returns the maximum supported keysize of the opened mode</span></li>
   <li><span class="function"><a href="function.mcrypt-encrypt.php" class="function" rel="rdfs-seeAlso">mcrypt_encrypt()</a> - Encrypts plaintext with given parameters</span></li>
  </ul>
 </div>


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