문제

이 루비 기능을 재현 할 수있는 방법이 있습니까?

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

PHP에서.

건배

도움이 되었습니까?

해결책

PHP를 사용하여 이와 같은 일이 있어야합니다. 해시시() 기능

function passwordhash($password, $salt)
{
   return hash('sha512', "{$password}:{$salt}");
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top