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

search for in the

mcrypt_module_is_block_algorithm_mode> <mcrypt_module_get_algo_key_size
Last updated: Fri, 20 May 2011

view this page in

mcrypt_module_get_supported_key_sizes

(PHP 4 >= 4.0.2, PHP 5)

mcrypt_module_get_supported_key_sizesDevuelve un array con los tamaños de clave soportados del algoritmo abierto

Descripción

array mcrypt_module_get_supported_key_sizes ( string $algorithm [, string $lib_dir ] )

Devuelve un array con los tamaños de clave soportados por el algoritmo especificado Si devuelve un array vacío es porque todos los tamaños de clave entre 1 y mcrypt_module_get_algo_key_size() son soportados por el algoritmo.

Parámetros

algorithm

El algoritmo a ser utilizado.

lib_dir

El parámetro opcional lib_dir puede contener la ubicación donde el módulo de algoritmos se encuentra dentro del sistema.

Valores devueltos

Devuelve un array con los tamaños de clave soportados por el algoritmo especificado Si devuelve un array vacío es porque todos los tamaños de clave entre 1 y mcrypt_module_get_algo_key_size() son soportados por el algoritmo.

Ver también



add a note add a note User Contributed Notes mcrypt_module_get_supported_key_sizes
Daniel Bartlett <dan at lockedbox dot net> 12-Feb-2004 06:50
A small bit of php for listing available encryption algorythms and their keysizes.

<?php
$cipher_dir
= "/usr/local/lib/libmcrypt";
$algorithms = mcrypt_list_algorithms($cipher_dir);
echo
"<html><head></head><body><table><tr>\n";
foreach (
$algorithms as $cipher) {
        echo
"<td>" . $cipher . "</td><td>";
       
$ksizes = mcrypt_module_get_supported_key_sizes($cipher, $cipher_dir);
        if(
$ksizes==NULL) echo mcrypt_module_get_algo_key_size($cipher, $cipher_dir);
        else foreach (
$ksizes as $size) {
                echo
$size . " ";
        }
        echo
"</td></tr>\n";
}
echo
"</table></body></html>\n";
?>

I hope some one finds it handy.

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