{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/65245061","id":65245061,"diff_hunk":"@@ -0,0 +1,198 @@\n+/**\n+ * Copyright 2016 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS-IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import {dev} from '../log';\n+import {getService} from '../service';\n+import {\n+  encodeByteArray,\n+} from\n+  '../../third_party/closure-library/encode-byte-array-trampoline-generated';","path":"src/service/crypto-verifier-impl.js","position":22,"original_position":22,"commit_id":"da40cb4339e0330751626c3e16a97a1905ef1f9b","original_commit_id":"da40cb4339e0330751626c3e16a97a1905ef1f9b","user":{"login":"bobcassels","id":3493758,"avatar_url":"https://avatars.githubusercontent.com/u/3493758?v=3","gravatar_id":"","url":"https://api.github.com/users/bobcassels","html_url":"https://github.com/bobcassels","followers_url":"https://api.github.com/users/bobcassels/followers","following_url":"https://api.github.com/users/bobcassels/following{/other_user}","gists_url":"https://api.github.com/users/bobcassels/gists{/gist_id}","starred_url":"https://api.github.com/users/bobcassels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobcassels/subscriptions","organizations_url":"https://api.github.com/users/bobcassels/orgs","repos_url":"https://api.github.com/users/bobcassels/repos","events_url":"https://api.github.com/users/bobcassels/events{/privacy}","received_events_url":"https://api.github.com/users/bobcassels/received_events","type":"User","site_admin":false},"body":"I will leave this question to others. The original code used utilities in goog.crypt. There was a way to import such things into AMP, so I used it.\r\n\r\nJust copying the goog.crypt code seemed wrong. Rewriting seemed silly / gratuitous. I agree that the current process for using these routines is awkward and error-prone.\r\n\r\nYou tell me what to do.","created_at":"2016-05-31T19:13:45Z","updated_at":"2016-05-31T19:13:45Z","html_url":"https://github.com/ampproject/amphtml/pull/3384#discussion_r65245061","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3384","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/65245061"},"html":{"href":"https://github.com/ampproject/amphtml/pull/3384#discussion_r65245061"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3384"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/3384","id":71941107,"html_url":"https://github.com/ampproject/amphtml/pull/3384","diff_url":"https://github.com/ampproject/amphtml/pull/3384.diff","patch_url":"https://github.com/ampproject/amphtml/pull/3384.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/3384","number":3384,"state":"open","locked":false,"title":"Cryptographic signature verification service","user":{"login":"bobcassels","id":3493758,"avatar_url":"https://avatars.githubusercontent.com/u/3493758?v=3","gravatar_id":"","url":"https://api.github.com/users/bobcassels","html_url":"https://github.com/bobcassels","followers_url":"https://api.github.com/users/bobcassels/followers","following_url":"https://api.github.com/users/bobcassels/following{/other_user}","gists_url":"https://api.github.com/users/bobcassels/gists{/gist_id}","starred_url":"https://api.github.com/users/bobcassels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobcassels/subscriptions","organizations_url":"https://api.github.com/users/bobcassels/orgs","repos_url":"https://api.github.com/users/bobcassels/repos","events_url":"https://api.github.com/users/bobcassels/events{/privacy}","received_events_url":"https://api.github.com/users/bobcassels/received_events","type":"User","site_admin":false},"body":"This service uses browser-native cryptographic routines to do cryptographic\r\nsignature verification.\r\n\r\nThis will be used by the [A4A](https://github.com/ampproject/amphtml/issues/3133) ads mechanism.\r\n\r\nFuture TODO: Clean up the way that these trampolines are compiled.","created_at":"2016-05-30T22:12:36Z","updated_at":"2016-05-31T19:13:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0116d7b4d5bd0f24acf5931be53c5c2365ca9bae","assignee":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3384/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3384/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/3384/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/da40cb4339e0330751626c3e16a97a1905ef1f9b","head":{"label":"google:crypto-verify-service","ref":"crypto-verify-service","sha":"da40cb4339e0330751626c3e16a97a1905ef1f9b","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":51965089,"name":"amphtml","full_name":"google/amphtml","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/google/amphtml","forks_url":"https://api.github.com/repos/google/amphtml/forks","keys_url":"https://api.github.com/repos/google/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/amphtml/teams","hooks_url":"https://api.github.com/repos/google/amphtml/hooks","issue_events_url":"https://api.github.com/repos/google/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/google/amphtml/events","assignees_url":"https://api.github.com/repos/google/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/google/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/google/amphtml/tags","blobs_url":"https://api.github.com/repos/google/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/google/amphtml/languages","stargazers_url":"https://api.github.com/repos/google/amphtml/stargazers","contributors_url":"https://api.github.com/repos/google/amphtml/contributors","subscribers_url":"https://api.github.com/repos/google/amphtml/subscribers","subscription_url":"https://api.github.com/repos/google/amphtml/subscription","commits_url":"https://api.github.com/repos/google/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/google/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/amphtml/merges","archive_url":"https://api.github.com/repos/google/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/amphtml/downloads","issues_url":"https://api.github.com/repos/google/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/google/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/google/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/google/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/google/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/google/amphtml/deployments","created_at":"2016-02-18T00:04:16Z","updated_at":"2016-05-31T16:08:23Z","pushed_at":"2016-05-31T17:15:55Z","git_url":"git://github.com/google/amphtml.git","ssh_url":"git@github.com:google/amphtml.git","clone_url":"https://github.com/google/amphtml.git","svn_url":"https://github.com/google/amphtml","homepage":"https://ampproject.org","size":59635,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":0,"forks":7,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"e6d35b81d52e9aa22071e1595e3b602024c91f29","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-05-31T09:17:05Z","pushed_at":"2016-05-31T18:11:19Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":82232,"stargazers_count":7543,"watchers_count":7543,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1019,"mirror_url":null,"open_issues_count":459,"forks":1019,"open_issues":459,"watchers":7543,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3384"},"html":{"href":"https://github.com/ampproject/amphtml/pull/3384"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/3384"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/3384/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3384/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3384/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/da40cb4339e0330751626c3e16a97a1905ef1f9b"}}}}
{"actor":{"display_login":"bobcassels"}}