{"action":"created","comment":{"url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/comments/49534814","id":49534814,"diff_hunk":"@@ -1,2 +1,154 @@\n+require_relative 'keystreamgenerator'\n+\n class Solitaire\n+\n+  def initialize(opts={})\n+    @message           = opts[:message]\n+    @encrypted_message = opts[:encrypted_message]\n+  end\n+\n+  def encrypt\n+    sanitize_message\n+    convert_message_to_numbers\n+    convert_keystream_to_numbers\n+    add_message_numbers\n+    convert_to_letters(added_message_numbers)\n+  end\n+\n+  def decrypt\n+    convert_encrypted_message_to_numbers\n+    convert_keystream_to_numbers\n+    subtract_message_numbers\n+    convert_to_letters(subtracted_message_numbers)\n+  end\n+\n+  private\n+\n+  LETTER_CONVERTER = Hash[('A'..'Z').zip (1..26)]\n+  NUMBER_CONVERTER = Hash[(1..26).zip ('A'..'Z')]","path":"solitaire.rb","position":null,"original_position":28,"commit_id":"66f82d3773b917ee62083510d9df8b68c29762ff","original_commit_id":"f3484e54fce9021b882cbb6770bc0eeaa36d0e9d","user":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"body":"used invert and moved the constant up.👍","created_at":"2016-01-13T00:08:14Z","updated_at":"2016-01-13T00:08:14Z","html_url":"https://github.com/pangperry/solitaire_cipher/pull/5#discussion_r49534814","pull_request_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/comments/49534814"},"html":{"href":"https://github.com/pangperry/solitaire_cipher/pull/5#discussion_r49534814"},"pull_request":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5","id":53520544,"html_url":"https://github.com/pangperry/solitaire_cipher/pull/5","diff_url":"https://github.com/pangperry/solitaire_cipher/pull/5.diff","patch_url":"https://github.com/pangperry/solitaire_cipher/pull/5.patch","issue_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/5","number":5,"state":"open","locked":false,"title":"Starting over with encrypt and keystream methods","user":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"body":"This PR includes encrypt and (now functional) keystream methods -- encrypt test passes.\r\nStill need to add decrypt method and plan to extract solitaire class.","created_at":"2015-12-14T03:10:39Z","updated_at":"2016-01-13T00:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abcfd3b28039e7d93444f12300e43a21d530ed1c","assignee":{"login":"adarsh","id":913757,"avatar_url":"https://avatars.githubusercontent.com/u/913757?v=3","gravatar_id":"","url":"https://api.github.com/users/adarsh","html_url":"https://github.com/adarsh","followers_url":"https://api.github.com/users/adarsh/followers","following_url":"https://api.github.com/users/adarsh/following{/other_user}","gists_url":"https://api.github.com/users/adarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/adarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adarsh/subscriptions","organizations_url":"https://api.github.com/users/adarsh/orgs","repos_url":"https://api.github.com/users/adarsh/repos","events_url":"https://api.github.com/users/adarsh/events{/privacy}","received_events_url":"https://api.github.com/users/adarsh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5/commits","review_comments_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5/comments","review_comment_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/5/comments","statuses_url":"https://api.github.com/repos/pangperry/solitaire_cipher/statuses/66f82d3773b917ee62083510d9df8b68c29762ff","head":{"label":"pangperry:starting_over","ref":"starting_over","sha":"66f82d3773b917ee62083510d9df8b68c29762ff","user":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"repo":{"id":45970839,"name":"solitaire_cipher","full_name":"pangperry/solitaire_cipher","owner":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pangperry/solitaire_cipher","description":"","fork":false,"url":"https://api.github.com/repos/pangperry/solitaire_cipher","forks_url":"https://api.github.com/repos/pangperry/solitaire_cipher/forks","keys_url":"https://api.github.com/repos/pangperry/solitaire_cipher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangperry/solitaire_cipher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangperry/solitaire_cipher/teams","hooks_url":"https://api.github.com/repos/pangperry/solitaire_cipher/hooks","issue_events_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/events{/number}","events_url":"https://api.github.com/repos/pangperry/solitaire_cipher/events","assignees_url":"https://api.github.com/repos/pangperry/solitaire_cipher/assignees{/user}","branches_url":"https://api.github.com/repos/pangperry/solitaire_cipher/branches{/branch}","tags_url":"https://api.github.com/repos/pangperry/solitaire_cipher/tags","blobs_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangperry/solitaire_cipher/statuses/{sha}","languages_url":"https://api.github.com/repos/pangperry/solitaire_cipher/languages","stargazers_url":"https://api.github.com/repos/pangperry/solitaire_cipher/stargazers","contributors_url":"https://api.github.com/repos/pangperry/solitaire_cipher/contributors","subscribers_url":"https://api.github.com/repos/pangperry/solitaire_cipher/subscribers","subscription_url":"https://api.github.com/repos/pangperry/solitaire_cipher/subscription","commits_url":"https://api.github.com/repos/pangperry/solitaire_cipher/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangperry/solitaire_cipher/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangperry/solitaire_cipher/contents/{+path}","compare_url":"https://api.github.com/repos/pangperry/solitaire_cipher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangperry/solitaire_cipher/merges","archive_url":"https://api.github.com/repos/pangperry/solitaire_cipher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangperry/solitaire_cipher/downloads","issues_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues{/number}","pulls_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls{/number}","milestones_url":"https://api.github.com/repos/pangperry/solitaire_cipher/milestones{/number}","notifications_url":"https://api.github.com/repos/pangperry/solitaire_cipher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangperry/solitaire_cipher/labels{/name}","releases_url":"https://api.github.com/repos/pangperry/solitaire_cipher/releases{/id}","created_at":"2015-11-11T09:02:18Z","updated_at":"2015-11-11T09:02:57Z","pushed_at":"2016-01-13T00:07:07Z","git_url":"git://github.com/pangperry/solitaire_cipher.git","ssh_url":"git@github.com:pangperry/solitaire_cipher.git","clone_url":"https://github.com/pangperry/solitaire_cipher.git","svn_url":"https://github.com/pangperry/solitaire_cipher","homepage":null,"size":22,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pangperry:master","ref":"master","sha":"08224da728b8d42b2d4f3770e1e0a418998f2c74","user":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"repo":{"id":45970839,"name":"solitaire_cipher","full_name":"pangperry/solitaire_cipher","owner":{"login":"pangperry","id":5420369,"avatar_url":"https://avatars.githubusercontent.com/u/5420369?v=3","gravatar_id":"","url":"https://api.github.com/users/pangperry","html_url":"https://github.com/pangperry","followers_url":"https://api.github.com/users/pangperry/followers","following_url":"https://api.github.com/users/pangperry/following{/other_user}","gists_url":"https://api.github.com/users/pangperry/gists{/gist_id}","starred_url":"https://api.github.com/users/pangperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangperry/subscriptions","organizations_url":"https://api.github.com/users/pangperry/orgs","repos_url":"https://api.github.com/users/pangperry/repos","events_url":"https://api.github.com/users/pangperry/events{/privacy}","received_events_url":"https://api.github.com/users/pangperry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pangperry/solitaire_cipher","description":"","fork":false,"url":"https://api.github.com/repos/pangperry/solitaire_cipher","forks_url":"https://api.github.com/repos/pangperry/solitaire_cipher/forks","keys_url":"https://api.github.com/repos/pangperry/solitaire_cipher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangperry/solitaire_cipher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangperry/solitaire_cipher/teams","hooks_url":"https://api.github.com/repos/pangperry/solitaire_cipher/hooks","issue_events_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/events{/number}","events_url":"https://api.github.com/repos/pangperry/solitaire_cipher/events","assignees_url":"https://api.github.com/repos/pangperry/solitaire_cipher/assignees{/user}","branches_url":"https://api.github.com/repos/pangperry/solitaire_cipher/branches{/branch}","tags_url":"https://api.github.com/repos/pangperry/solitaire_cipher/tags","blobs_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangperry/solitaire_cipher/statuses/{sha}","languages_url":"https://api.github.com/repos/pangperry/solitaire_cipher/languages","stargazers_url":"https://api.github.com/repos/pangperry/solitaire_cipher/stargazers","contributors_url":"https://api.github.com/repos/pangperry/solitaire_cipher/contributors","subscribers_url":"https://api.github.com/repos/pangperry/solitaire_cipher/subscribers","subscription_url":"https://api.github.com/repos/pangperry/solitaire_cipher/subscription","commits_url":"https://api.github.com/repos/pangperry/solitaire_cipher/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangperry/solitaire_cipher/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangperry/solitaire_cipher/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangperry/solitaire_cipher/contents/{+path}","compare_url":"https://api.github.com/repos/pangperry/solitaire_cipher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangperry/solitaire_cipher/merges","archive_url":"https://api.github.com/repos/pangperry/solitaire_cipher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangperry/solitaire_cipher/downloads","issues_url":"https://api.github.com/repos/pangperry/solitaire_cipher/issues{/number}","pulls_url":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls{/number}","milestones_url":"https://api.github.com/repos/pangperry/solitaire_cipher/milestones{/number}","notifications_url":"https://api.github.com/repos/pangperry/solitaire_cipher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangperry/solitaire_cipher/labels{/name}","releases_url":"https://api.github.com/repos/pangperry/solitaire_cipher/releases{/id}","created_at":"2015-11-11T09:02:18Z","updated_at":"2015-11-11T09:02:57Z","pushed_at":"2016-01-13T00:07:07Z","git_url":"git://github.com/pangperry/solitaire_cipher.git","ssh_url":"git@github.com:pangperry/solitaire_cipher.git","clone_url":"https://github.com/pangperry/solitaire_cipher.git","svn_url":"https://github.com/pangperry/solitaire_cipher","homepage":null,"size":22,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5"},"html":{"href":"https://github.com/pangperry/solitaire_cipher/pull/5"},"issue":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/5"},"comments":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/pangperry/solitaire_cipher/statuses/66f82d3773b917ee62083510d9df8b68c29762ff"}}}}