欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

单向字符串加密的php实例_PHP教程

程序员文章站 2022-05-24 12:05:31
...
/**
* 单向字符串加密算法 不能用作密码加密
*/
if (CRYPT_STD_DES == 1)
{
echo "Standard DES: ".crypt("hello world")."\n";
}
else
{
echo "Standard DES not supported.\n";
}

if (CRYPT_EXT_DES == 1)
{
echo "Extended DES: ".crypt("hello world")."\n";
}
else
{
echo "Extended DES not supported.\n";
}

if (CRYPT_MD5 == 1)
{
echo "MD5: ".crypt("hello world")."\n";
}
else
{
echo "MD5 not supported.\n";
}

if (CRYPT_BLOWFISH == 1)
{
echo "Blowfish: ".crypt("hello world");
}
else
{
echo "Blowfish DES not supported.";
}
?>

作者:k7gxn56

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/364730.htmlTechArticle?php /** * 单向字符串加密算法 不能用作密码加密 */ if (CRYPT_STD_DES == 1) { echo Standard DES: .crypt(hello world).\n; } else { echo Standard DES not supported.\n;...