array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.mcrypt-get-cipher-name.php', 1 => 'mcrypt_get_cipher_name', ), 'up' => array ( 0 => 'ref.mcrypt.php', 1 => 'Fonctions Mcrypt', ), 'prev' => array ( 0 => 'function.mcrypt-get-block-size.php', 1 => 'mcrypt_get_block_size', ), 'next' => array ( 0 => 'function.mcrypt-get-iv-size.php', 1 => 'mcrypt_get_iv_size', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'fr', 'path' => 'reference/mcrypt/functions/mcrypt-get-cipher-name.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
mcrypt_get_cipher_name — Lit le nom du chiffrement utilisé
Cette fonction est OBSOLÈTE à partir de PHP 7.1.0 et a été SUPPRIMÉE à partir de PHP 7.2.0. Dépendre de cette fonction est fortement déconseillé.
mcrypt_get_cipher_name() retourne le nom du chiffrement utilisé.
mcrypt_get_cipher_name() prend le numéro de
chiffrement (avec libmcrypt 2.2.x) ou prend le nom du chiffrement
(avec libmcrypt 2.4.x) comme paramètre, et retourne le nom du
chiffrement, ou false
, s'il n'existe pas.
cipher
Une constante parmi les constantes
MCRYPT_ciphername
, ou le nom de l'algorithme, sous la forme d'une chaîne de caractères.
Cette fonction retourne le nom du cipher ou false
si le cipher n'existe pas.
Exemple #1 Exemple avec mcrypt_get_cipher_name()
<?php
$cipher = MCRYPT_TripleDES;
echo mcrypt_get_cipher_name($cipher);
?>
L'exemple ci-dessus va afficher :
3DES