> perl -e 'print crypt("foo",q[$1$bar$]), "\n"' $1$bar$gJTJurciWk9pIaPpodyiw. > perl -e 'print crypt("foo",q[$2x$bar$]), "\n"' $2zJyhpjk3l9E #### $des_salt = substr(crypt(rand(), "aa"), -3, 2); $md5_salt = '$1$' . substr(crypt(rand().rand(), '$1$aaaaaaaa$'), -9, 8) . '$';