温馨提示×

怎么用php给数据加密

九三
159
2021-02-25 19:22:38
栏目: 编程语言

怎么用php给数据加密

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

crypt函数语法:

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

crypt函数使用方法:

// 需要加密的字符串

$str = 'this is string';

$res = crypt($str);

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

0