PHP kodu:
function compute_signature($key, $hash_string)
{
$digest = hash_hmac("sha1", $hash_string, $key, true);
return base64_encode($digest);
}
Yakut Kodu:
digest = HMAC.digest(Digest.new(SHA1), Base64.decode64(key), HashString)
return Base64.encode64(digest.to_s()).chomp()
Could this be a charset issue? I found this: http://stackoverflow.com/questions/790232/c-sha-1-vs-php-sha-1-different-results
Eğer öyleyse nasıl düzeltebilirim ki? Ben PHP maç Rubys sonuçlar yapmak gerekir, ters bu durumda yardımcı olmaz.