开发者

Ruby password SHA512 hash replication using PHP

is there any way I can reproduce this ruby function:

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

In php.

Cheers


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

function passwordhash($password, $salt)
{
   return hash('sha512', "{$password}:{$salt}");
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜