Skip to content

Instantly share code, notes, and snippets.

@hlxwell
Created August 28, 2012 16:26
Show Gist options
  • Save hlxwell/3499969 to your computer and use it in GitHub Desktop.
Save hlxwell/3499969 to your computer and use it in GitHub Desktop.
token code
require "digest"
@json_data = '{"device_id":"3079c62cc69de1eace695459207e41d71f4a53f3","logs":[{"kid_name":"Raspu","option_id":"あか","book_id":"50041a0b9a208511cd000004","question_id":"5020b1c99a208574b0000013"},{"kid_name":"Raspu","option_id":"き","book_id":"50041a0b9a208511cd000004","question_id":"5020b81c9a208574b000001f"}]}'
@correct_token = Digest::SHA2.new << "#{@json_data}3079c62cc69de1eace695459207e41d71f4a53f3"
puts @correct_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment