{"action":"created","comment":{"url":"https://api.github.com/repos/latchset/jwcrypto/pulls/comments/70906265","id":70906265,"diff_hunk":"@@ -542,6 +600,25 @@ def _get_alg_enc_from_headers(self, jh):\n         enc = self._jwa(encname)\n         return alg, enc\n \n+    def _encrypt(self, alg, enc, jh):\n+        aad = base64url_encode(self.objects.get('protected', ''))\n+        if 'aad' in self.objects:\n+            aad += '.' + base64url_encode(self.objects['aad'])","path":"jwcrypto/jwe.py","position":658,"original_position":79,"commit_id":"1f070345282feef4a551ebd7c533c83c5a9dc0e3","original_commit_id":"b81ff8aff6aa79ed4c8dfa5622b05f0deacf34be","user":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"body":"Nope self.objects['add'] is in binary form throughout the code, it is not encoded on __init__ and it is decoded on deserialization.","created_at":"2016-07-15T00:29:14Z","updated_at":"2016-07-15T00:29:14Z","html_url":"https://github.com/latchset/jwcrypto/pull/38#discussion_r70906265","pull_request_url":"https://api.github.com/repos/latchset/jwcrypto/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/comments/70906265"},"html":{"href":"https://github.com/latchset/jwcrypto/pull/38#discussion_r70906265"},"pull_request":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/latchset/jwcrypto/pulls/38","id":77541944,"html_url":"https://github.com/latchset/jwcrypto/pull/38","diff_url":"https://github.com/latchset/jwcrypto/pull/38.diff","patch_url":"https://github.com/latchset/jwcrypto/pull/38.patch","issue_url":"https://api.github.com/repos/latchset/jwcrypto/issues/38","number":38,"state":"open","locked":false,"title":"Add the missing JWE Key wrapping algorithms","user":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"body":"Adds AESGCMKW, PBES2 and ECDH-ES algorithms with tests.\r\n\r\n@npmccallum can you please take a look ?","created_at":"2016-07-14T23:20:11Z","updated_at":"2016-07-15T00:29:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"582712d0336f7caca6797c3b7d1a7ff458fc45e3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/latchset/jwcrypto/pulls/38/commits","review_comments_url":"https://api.github.com/repos/latchset/jwcrypto/pulls/38/comments","review_comment_url":"https://api.github.com/repos/latchset/jwcrypto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/latchset/jwcrypto/issues/38/comments","statuses_url":"https://api.github.com/repos/latchset/jwcrypto/statuses/1f070345282feef4a551ebd7c533c83c5a9dc0e3","head":{"label":"simo5:jwe_more_jwa","ref":"jwe_more_jwa","sha":"1f070345282feef4a551ebd7c533c83c5a9dc0e3","user":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"repo":{"id":52033027,"name":"jwcrypto","full_name":"simo5/jwcrypto","owner":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simo5/jwcrypto","description":"Implements JWK,JWS,JWE specifications using python-cryptography","fork":true,"url":"https://api.github.com/repos/simo5/jwcrypto","forks_url":"https://api.github.com/repos/simo5/jwcrypto/forks","keys_url":"https://api.github.com/repos/simo5/jwcrypto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simo5/jwcrypto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simo5/jwcrypto/teams","hooks_url":"https://api.github.com/repos/simo5/jwcrypto/hooks","issue_events_url":"https://api.github.com/repos/simo5/jwcrypto/issues/events{/number}","events_url":"https://api.github.com/repos/simo5/jwcrypto/events","assignees_url":"https://api.github.com/repos/simo5/jwcrypto/assignees{/user}","branches_url":"https://api.github.com/repos/simo5/jwcrypto/branches{/branch}","tags_url":"https://api.github.com/repos/simo5/jwcrypto/tags","blobs_url":"https://api.github.com/repos/simo5/jwcrypto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simo5/jwcrypto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simo5/jwcrypto/git/refs{/sha}","trees_url":"https://api.github.com/repos/simo5/jwcrypto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simo5/jwcrypto/statuses/{sha}","languages_url":"https://api.github.com/repos/simo5/jwcrypto/languages","stargazers_url":"https://api.github.com/repos/simo5/jwcrypto/stargazers","contributors_url":"https://api.github.com/repos/simo5/jwcrypto/contributors","subscribers_url":"https://api.github.com/repos/simo5/jwcrypto/subscribers","subscription_url":"https://api.github.com/repos/simo5/jwcrypto/subscription","commits_url":"https://api.github.com/repos/simo5/jwcrypto/commits{/sha}","git_commits_url":"https://api.github.com/repos/simo5/jwcrypto/git/commits{/sha}","comments_url":"https://api.github.com/repos/simo5/jwcrypto/comments{/number}","issue_comment_url":"https://api.github.com/repos/simo5/jwcrypto/issues/comments{/number}","contents_url":"https://api.github.com/repos/simo5/jwcrypto/contents/{+path}","compare_url":"https://api.github.com/repos/simo5/jwcrypto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simo5/jwcrypto/merges","archive_url":"https://api.github.com/repos/simo5/jwcrypto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simo5/jwcrypto/downloads","issues_url":"https://api.github.com/repos/simo5/jwcrypto/issues{/number}","pulls_url":"https://api.github.com/repos/simo5/jwcrypto/pulls{/number}","milestones_url":"https://api.github.com/repos/simo5/jwcrypto/milestones{/number}","notifications_url":"https://api.github.com/repos/simo5/jwcrypto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simo5/jwcrypto/labels{/name}","releases_url":"https://api.github.com/repos/simo5/jwcrypto/releases{/id}","deployments_url":"https://api.github.com/repos/simo5/jwcrypto/deployments","created_at":"2016-02-18T19:32:48Z","updated_at":"2016-06-05T23:31:48Z","pushed_at":"2016-07-14T23:16:37Z","git_url":"git://github.com/simo5/jwcrypto.git","ssh_url":"git@github.com:simo5/jwcrypto.git","clone_url":"https://github.com/simo5/jwcrypto.git","svn_url":"https://github.com/simo5/jwcrypto","homepage":"","size":328,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"latchset:master","ref":"master","sha":"e222facace68c668ae7f5abb149bef120b501744","user":{"login":"latchset","id":17146082,"avatar_url":"https://avatars.githubusercontent.com/u/17146082?v=3","gravatar_id":"","url":"https://api.github.com/users/latchset","html_url":"https://github.com/latchset","followers_url":"https://api.github.com/users/latchset/followers","following_url":"https://api.github.com/users/latchset/following{/other_user}","gists_url":"https://api.github.com/users/latchset/gists{/gist_id}","starred_url":"https://api.github.com/users/latchset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latchset/subscriptions","organizations_url":"https://api.github.com/users/latchset/orgs","repos_url":"https://api.github.com/users/latchset/repos","events_url":"https://api.github.com/users/latchset/events{/privacy}","received_events_url":"https://api.github.com/users/latchset/received_events","type":"Organization","site_admin":false},"repo":{"id":31667038,"name":"jwcrypto","full_name":"latchset/jwcrypto","owner":{"login":"latchset","id":17146082,"avatar_url":"https://avatars.githubusercontent.com/u/17146082?v=3","gravatar_id":"","url":"https://api.github.com/users/latchset","html_url":"https://github.com/latchset","followers_url":"https://api.github.com/users/latchset/followers","following_url":"https://api.github.com/users/latchset/following{/other_user}","gists_url":"https://api.github.com/users/latchset/gists{/gist_id}","starred_url":"https://api.github.com/users/latchset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latchset/subscriptions","organizations_url":"https://api.github.com/users/latchset/orgs","repos_url":"https://api.github.com/users/latchset/repos","events_url":"https://api.github.com/users/latchset/events{/privacy}","received_events_url":"https://api.github.com/users/latchset/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/latchset/jwcrypto","description":"Implements JWK,JWS,JWE specifications using python-cryptography","fork":false,"url":"https://api.github.com/repos/latchset/jwcrypto","forks_url":"https://api.github.com/repos/latchset/jwcrypto/forks","keys_url":"https://api.github.com/repos/latchset/jwcrypto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/latchset/jwcrypto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/latchset/jwcrypto/teams","hooks_url":"https://api.github.com/repos/latchset/jwcrypto/hooks","issue_events_url":"https://api.github.com/repos/latchset/jwcrypto/issues/events{/number}","events_url":"https://api.github.com/repos/latchset/jwcrypto/events","assignees_url":"https://api.github.com/repos/latchset/jwcrypto/assignees{/user}","branches_url":"https://api.github.com/repos/latchset/jwcrypto/branches{/branch}","tags_url":"https://api.github.com/repos/latchset/jwcrypto/tags","blobs_url":"https://api.github.com/repos/latchset/jwcrypto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/latchset/jwcrypto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/latchset/jwcrypto/git/refs{/sha}","trees_url":"https://api.github.com/repos/latchset/jwcrypto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/latchset/jwcrypto/statuses/{sha}","languages_url":"https://api.github.com/repos/latchset/jwcrypto/languages","stargazers_url":"https://api.github.com/repos/latchset/jwcrypto/stargazers","contributors_url":"https://api.github.com/repos/latchset/jwcrypto/contributors","subscribers_url":"https://api.github.com/repos/latchset/jwcrypto/subscribers","subscription_url":"https://api.github.com/repos/latchset/jwcrypto/subscription","commits_url":"https://api.github.com/repos/latchset/jwcrypto/commits{/sha}","git_commits_url":"https://api.github.com/repos/latchset/jwcrypto/git/commits{/sha}","comments_url":"https://api.github.com/repos/latchset/jwcrypto/comments{/number}","issue_comment_url":"https://api.github.com/repos/latchset/jwcrypto/issues/comments{/number}","contents_url":"https://api.github.com/repos/latchset/jwcrypto/contents/{+path}","compare_url":"https://api.github.com/repos/latchset/jwcrypto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/latchset/jwcrypto/merges","archive_url":"https://api.github.com/repos/latchset/jwcrypto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/latchset/jwcrypto/downloads","issues_url":"https://api.github.com/repos/latchset/jwcrypto/issues{/number}","pulls_url":"https://api.github.com/repos/latchset/jwcrypto/pulls{/number}","milestones_url":"https://api.github.com/repos/latchset/jwcrypto/milestones{/number}","notifications_url":"https://api.github.com/repos/latchset/jwcrypto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/latchset/jwcrypto/labels{/name}","releases_url":"https://api.github.com/repos/latchset/jwcrypto/releases{/id}","deployments_url":"https://api.github.com/repos/latchset/jwcrypto/deployments","created_at":"2015-03-04T16:27:37Z","updated_at":"2016-03-29T04:12:34Z","pushed_at":"2016-07-14T23:20:11Z","git_url":"git://github.com/latchset/jwcrypto.git","ssh_url":"git@github.com:latchset/jwcrypto.git","clone_url":"https://github.com/latchset/jwcrypto.git","svn_url":"https://github.com/latchset/jwcrypto","homepage":"","size":299,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":9,"forks":10,"open_issues":9,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/38"},"html":{"href":"https://github.com/latchset/jwcrypto/pull/38"},"issue":{"href":"https://api.github.com/repos/latchset/jwcrypto/issues/38"},"comments":{"href":"https://api.github.com/repos/latchset/jwcrypto/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/latchset/jwcrypto/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/latchset/jwcrypto/statuses/1f070345282feef4a551ebd7c533c83c5a9dc0e3"}}}}
{"actor":{"display_login":"simo5"}}