$des_salt = substr(crypt(rand(), "aa"), -3, 2); $md5_salt = '$1$' . substr(crypt(rand().rand(), '$1$aaaaaaaa$'), -9, 8) . '$';