Skip to content

Instantly share code, notes, and snippets.

@kamal
Created March 18, 2009 15:04
Show Gist options
  • Select an option

  • Save kamal/81168 to your computer and use it in GitHub Desktop.

Select an option

Save kamal/81168 to your computer and use it in GitHub Desktop.
sig = @@pkey.sign(OpenSSL::Digest::SHA1.new, data)
sig = [sig].pack("m").gsub(/\n/, "") #Base64 encode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment