note 14393 added to function.crypt.php
| From: | oliver at samera dot com dot py | Date: | Sun, 29 Jul 2001 17:22:11 +0000 |
| Subject: | note 14393 added to function.crypt.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16021@lists.php.net to get a copy of this message | ||
#!/usr/bin/php -q
<?php
// here is a simple crypt() program.
// just do a chmod +x to ejecute as a regular binary
// usage: crypt.php3 pass '$1$n3d0ezpg$'
if(! isset($argv[1])) {
echo "";
exit;
}
if(! isset($argv[2])) {
echo "";
exit;
}
$pass_plain = $argv[1];
$pass_salt = $argv[2];
$pass = crypt($pass_plain, $pass_salt);
echo "$pass";
?>
http://www.php.net/manual/en/function.crypt.php