Home > Backend Development > PHP Tutorial > PHP example of one-way string encryption_PHP tutorial

PHP example of one-way string encryption_PHP tutorial

WBOY
Release: 2016-07-21 14:53:33
Original
883 people have browsed it

/**
* One-way string encryption algorithm cannot be used for password encryption
*/
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 /*** One-way string encryption algorithm cannot be used for password encryption*/ if (CRYPT_STD_DES == 1) { echo Standard DES: .crypt(hello world).n; } else { echo Standard DES not supported.n;...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template