From: "Leoš Bitto" Date: 2007-03-03T20:56:30+09:00 Subject: Re: Plan to add ext/digest/lib/digest/hmac.rb to 1.8.6 or 1.8.7? Akinori MUSHA wrote: > At Fri, 2 Mar 2007 18:47:20 +0900, > Zev Blut wrote: >> I current have a need to use the HMAC hashing algorithm and noticed >> that there is an implementation in the trunk under >> ext/digest/lib/digest/hmac.rb >> >> I noticed that the digest has some stuff from trunk merged into the >> 1.8 branch. Unfortunately, hmac did not follow. Is this on purpose? >> If so, will I have to wait for Ruby 1.9 before this is officially >> included? > > There was a discussion as to if HMAC should be (directly) under the > namespace "Digest", so I'm keeping it in trunk at the moment. > > I am interested in and have some ideas for improving digest/crypto > interfaces, which I am going to work on together with Yuzo-san, the > maintainer of ext/openssl, and those who are interested in that area. > > Speaking of which, the OpenSSL::HMAC module is available right now. :) > OpenSSL is exactly what I was about to suggest. I have to use HMAC-SHA1 and this works perfectly for me in Ruby 1.8: OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1.new, "secret", "data") Leos Bitto