From: Richard Kilmer Date: 2003-02-05T02:52:43+09:00 Subject: SHA1 hash on OS X incorrect I was just stunned by the fact that the SHA1 hash in Ruby on OS X (Jaguar) produces incorrect results. I use SHA1 in the jabber4r (Ruby Jabber) library for digest authentication. This effectively prevents jabber4r from working on the stock Ruby that ships with OS X. test.rb... require 'digest/sha1' puts Digest::SHA1.new("test").hexdigest And then a few tests: /usr/bin/ruby -v ruby 1.6.7 (2002-03-01) [powerpc-darwin6.0] /usr/bin/ruby test.rb 94266438e06c02e522256b64ed8c833aef0270d0 ^ ^ ^ This number is incorrect. Under 1.6.7 on Win32 and Linux it produces the correct result. /usr/local/bin/ruby -v ruby 1.8.0 (2003-01-31) [powerpc-darwin6.3] /usr/local/bin/ruby test.rb a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 ^ ^ ^ This is correct. Anyone want to corroborate? -rich