温馨提示×

怎么用php给数据加密

九三
161
2021-02-25 19:22:38
栏目: 编程语言
PHP开发者专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

怎么用php给数据加密

在php中使用crypt函数对数据进行加密,具体方法如下:

crypt函数语法:

string crypt ( string $str [, string $salt ] )

crypt函数使用方法:

// 需要加密的字符串

$str = 'this is string';

$res = crypt($str);

$res = crypt($str, 'ly');

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:如何给php加密授权

0