Skip to content

Instantly share code, notes, and snippets.

View astrsk-hori's full-sized avatar

Go Horie astrsk-hori

  • 株式会社アスタリスク
  • tokyo
View GitHub Profile
@ys4kw
ys4kw / ruby-iab.md
Last active December 20, 2015 04:09
RubyでのAndroidの課金処理
def in_app_purchase signature, receipt_data, base64_encoded_public_key
  public_key = OpenSSL::PKey::RSA.new(base64_encoded_public_key)
  if public_key.verify(OpenSSL::Digest::SHA1.new, Base64.decode64(signature), receipt_data)
    # Success
  else
    # Failure
  end
end