Skip to content

Instantly share code, notes, and snippets.

@kamal
Created March 18, 2009 15:03
Show Gist options
  • Save kamal/81167 to your computer and use it in GitHub Desktop.
Save kamal/81167 to your computer and use it in GitHub Desktop.
digest = OpenSSL::Digest::SHA1.new(data).hexdigest
sig = [@@pkey.private_encrypt(digest)].pack("m") #Base64 encode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment