Skip to content

Instantly share code, notes, and snippets.

@galex
Created August 2, 2012 05:01
Show Gist options
  • Save galex/3233814 to your computer and use it in GitHub Desktop.
Save galex/3233814 to your computer and use it in GitHub Desktop.
Android in-app billing signature validation on server side
class Android
def self.verify(data , sig)
official_key = "mykeygoeshere"
key = OpenSSL::PKey::RSA.new(Base64.decode64(official_key))
verified = key.verify( OpenSSL::Digest::SHA1.new, Base64.decode64(sig), data )
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment