広告
Unix 標準の DES 暗号を使って文字列を暗号化します。引数には暗号化したい文字列を指定し、オプションで暗号化のベースとなる 2 文字の salt を指定します。salt が指定されなかった場合にはランダムに生成されます。
<?php $passwd = crypt("sAmple"); $input = "sAmple"; if (crypt($input,$passwd) == $passwd) { print "OK"; } ?>
https://www.7key.jp/program/php/crypt.html