Created
April 25, 2011 16:36
-
-
Save jamster/940768 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'base64' | |
| require 'open-uri' | |
| string = "hardware_version=google&app_version=1.0.0&api_key=asdf1234&device_id=1234&os_version=2.0&user_code=988748513" | |
| encoded = Base64.encode64(string).gsub(/\n/,'') | |
| puts encoded | |
| puts Base64.decode64(encoded) | |
| puts Base64.decode64("aGFyZHdhcmVfdmVyc2lvbj1nb29nbGUmYXBwX3ZlcnNpb249MS4wLjAmYXBpX2tleT1hc2RmMTIzNCZkZXZpY2VfaWQ9MTIzNCZvc192ZXJzaW9uPTIuMCZ1c2VyX2NvZGU9OTg4NzQ4NTEz") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment