actually, that passwd is crypt passwd.
has a lot of way to generate passwd.
you can see my document if you known chinese LOL.
http://netkiller.hikz.com/book/security/
the following is c language
[root@linux root]# cat crypt.c
/*
Netkiller 2003-06-27 crypt.c
char *crypt(const char *key, const char *salt);
*/
#include <unistd.h>
main(){
char key[256];
char salt[64];
char passwd[256];
printf("key:");
scanf("%s",&key);
printf("salt:");
scanf("%s",&salt);
sprintf(passwd,"passwd:%s\n",crypt(key,salt));
printf(passwd);
}
[root@linux root]# gcc -o crypt -s crypt.c –lcrypt
[root@linux root]# ./crypt
key:chen
salt:salt
passwd:sa0hRW/W3DLvQ
[root@linux root]#
# cat crypt.php
<html>
<p>DES 密码</p>
<form method=post action=crypt.php>
<p>password:<input name=passwd type=text size=20></p>
<input type=submit value=submit>
</form>
<?
$enpw=crypt($passwd);
echo "password is: $enpw";
?>
perl -e 'print("userPassword: ".crypt("secret","salt")."\n");'
mysql crypt
select encrypt('password');
mysql> select encrypt('password');
+---------------------+
| encrypt('password') |
+---------------------+
| WXvvG0CWY7v5I |
+---------------------+
1 row in set (0.00 sec)
mysql>