1

有什么办法可以重现这个红宝石功能:

def Password.hash(password,salt)
    Digest::SHA512.hexdigest("#{password}:#{salt}")
end

在 php.ini 中。

干杯

4

1 回答 1

1

Something like this should do it, using the php hash() function

function passwordhash($password, $salt)
{
   return hash('sha512', "{$password}:{$salt}");
}
于 2009-11-02T10:19:52.217 回答