mcrypt_module_self_test

(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)

mcrypt_module_self_testPrueba un modo

Advertencia

Esta función está OBSOLETA a partir de PHP 7.1.0 y ha sido ELIMINADA a partir de PHP 7.2.0. Depender de esta función está fuertemente desaconsejado.

Descripción

mcrypt_module_self_test(string $algorithm, string $lib_dir = ?): bool

Realiza una prueba sobre el algoritmo especificado.

Parámetros

algorithm

One of the MCRYPT_ciphername constants, or the name of the algorithm as string.

lib_dir

El argumento opcional lib_dir contiene la ruta de acceso hasta el módulo del algoritmo en el sistema.

Valores devueltos

Devuelve true si la prueba funciona, y false en caso contrario.

Ejemplos

Ejemplo #1 Ejemplo con mcrypt_module_self_test()

<?php
var_dump
(mcrypt_module_self_test(MCRYPT_RIJNDAEL_128)) . "\n";
var_dump(mcrypt_module_self_test(MCRYPT_BOGUS_CYPHER));
?>

El ejemplo anterior mostrará :

bool(true)
bool(false)

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top