导航首页 » 技术教程 » PHP:mcrypt_get_cipher_name()的用法_Mcrypt函数
PHP:mcrypt_get_cipher_name()的用法_Mcrypt函数 142 2023-12-15   

mcrypt_get_cipher_name

(PHP 4, PHP 5)

mcrypt_get_cipher_name — 获取加密算法名称

说明

string mcrypt_get_cipher_name ( int $cipher ) string mcrypt_get_cipher_name ( string $cipher )

mcrypt_get_cipher_name() 用来获取加密算法名称。

libmcrypt 2.2.x 中,mcrypt_get_cipher_name() 接受整数表达的加密算法, libmcrypt 2.4.x 及更高版本中,它接受字符串表达的加密算法名称, 返回的都是字符串表达的名称,如果算法不存在则返回 FALSE

参数

cipher

MCRYPT_ciphername 常量中的一个,或者是字符串值的算法名称。

返回值

本函数返回加密算法名称, 如果算法不存在返回 FALSE

范例

Example #1 mcrypt_get_cipher_name() 例程

<?php
   $cipher = MCRYPT_TripleDES;

   echo mcrypt_get_cipher_name($cipher);
?>

以上例程会输出:

3DES


!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103