I\'m writing a small ruby program to play with Twitter over OAuth and have yet to find a right way to do the HMAC-SHA1 signature. So far, I messed around with
def hmac_sha1(data, secret=HOST_KEY) require 'base64' require 'cgi' require 'openssl' hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha1'), secret.encode("ASCII"), data.encode("ASCII")) return hmac end