downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mcrypt_list_algorithms> <mcrypt_get_iv_size
Last updated: Fri, 20 May 2011

view this page in

mcrypt_get_key_size

(PHP 4, PHP 5)

mcrypt_get_key_sizeToma el tamaño de clave del cifrador especificado

Descripción

int mcrypt_get_key_size ( int $cipher )
int mcrypt_get_key_size ( string $cipher , string $module )

El primer prototipo es cuando está enlazado con libmcrypt 2.2.x, el segundo cuando está enlazado con libmcrypt 2.4.x o 2.5.x.

mcrypt_get_key_size() es utilizada para tomar el tamaño de la clave del cifrador especificado con el parámetro cipher (en combinación con un modo de cifrado).

Es más útil usar la función mcrypt_enc_get_key_size() ya que ésta última hace uso del valor resource devuelto por mcrypt_module_open().

Ejemplos

Example #1 Ejemplo de mcrypt_get_key_size()

<?php
    
echo mcrypt_get_key_size('tripledes''ecb');
?>

Este ejemplo anterior muestra cómo utilizar esta función cuando está enlazada con libmcrypt 2.4.x o 2.5.x.

El resultado del ejemplo sería:

24

Ver también



add a note add a note User Contributed Notes mcrypt_get_key_size
Robin 09-Mar-2010 12:43
While not specified in the description, this function, just like mcrypt_enc_get_key_size(), returns the cipher's largest key size in BYTES.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites