单向字符串加密的php实例

前端之家收集整理的这篇文章主要介绍了单向字符串加密的php实例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<?PHP
/**
 * 单向字符串加密算法    不能用作密码加密
 */
if (CRYPT_STD_DES == 1)
{
echo "Standard DES: ".crypt("hello world")."";
}
else
{
echo "Standard DES not supported.";
}

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

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

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

作者:k7gxn56

猜你在找的PHP相关文章