{"action":"created","comment":{"url":"https://api.github.com/repos/google/tink/pulls/comments/226794228","pull_request_review_id":166711477,"id":226794228,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjc5NDIyOA==","diff_hunk":"@@ -85,11 +88,18 @@ func GetCurve(curve string) elliptic.Curve {\n }\n \n // ComputeHash calculates a hash of the given data using the given hash function.\n-func ComputeHash(hashFunc func() hash.Hash, data []byte) []byte {\n+func ComputeHash(hashFunc func() hash.Hash, data []byte) (hashed []byte, err error) {\n+\tif hashFunc == nil {\n+\t\terr = errNilHashFunc\n+\t\treturn\n+\t}\n \th := hashFunc()\n-\th.Write(data)\n-\tret := h.Sum(nil)\n-\treturn ret\n+\t_, err = h.Write(data)\n+\tif err != nil {\n+\t\treturn","path":"go/subtle/util.go","position":30,"original_position":30,"commit_id":"a8b95f64de0a4242c96009d768c9ef899b74562b","original_commit_id":"bd9937ffd02773b639b4665acfbfd373934e0248","user":{"login":"thaidn","id":7532,"node_id":"MDQ6VXNlcjc1MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/7532?v=4","gravatar_id":"","url":"https://api.github.com/users/thaidn","html_url":"https://github.com/thaidn","followers_url":"https://api.github.com/users/thaidn/followers","following_url":"https://api.github.com/users/thaidn/following{/other_user}","gists_url":"https://api.github.com/users/thaidn/gists{/gist_id}","starred_url":"https://api.github.com/users/thaidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaidn/subscriptions","organizations_url":"https://api.github.com/users/thaidn/orgs","repos_url":"https://api.github.com/users/thaidn/repos","events_url":"https://api.github.com/users/thaidn/events{/privacy}","received_events_url":"https://api.github.com/users/thaidn/received_events","type":"User","site_admin":false},"body":"why don't you return the error here?","created_at":"2018-10-19T22:10:28Z","updated_at":"2018-10-19T22:10:28Z","html_url":"https://github.com/google/tink/pull/149#discussion_r226794228","pull_request_url":"https://api.github.com/repos/google/tink/pulls/149","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/tink/pulls/comments/226794228"},"html":{"href":"https://github.com/google/tink/pull/149#discussion_r226794228"},"pull_request":{"href":"https://api.github.com/repos/google/tink/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/google/tink/pulls/149","id":223466304,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNDY2MzA0","html_url":"https://github.com/google/tink/pull/149","diff_url":"https://github.com/google/tink/pull/149.diff","patch_url":"https://github.com/google/tink/pull/149.patch","issue_url":"https://api.github.com/repos/google/tink/issues/149","number":149,"state":"open","locked":false,"title":"Cuonglm/fix unhandle errors","user":{"login":"Gnouc","id":4304764,"node_id":"MDQ6VXNlcjQzMDQ3NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4304764?v=4","gravatar_id":"","url":"https://api.github.com/users/Gnouc","html_url":"https://github.com/Gnouc","followers_url":"https://api.github.com/users/Gnouc/followers","following_url":"https://api.github.com/users/Gnouc/following{/other_user}","gists_url":"https://api.github.com/users/Gnouc/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnouc/subscriptions","organizations_url":"https://api.github.com/users/Gnouc/orgs","repos_url":"https://api.github.com/users/Gnouc/repos","events_url":"https://api.github.com/users/Gnouc/events{/privacy}","received_events_url":"https://api.github.com/users/Gnouc/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-17T04:34:56Z","updated_at":"2018-10-19T22:10:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6190b51c3b41dfdc20d0355421e5e48f74bbdad","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":957037277,"node_id":"MDU6TGFiZWw5NTcwMzcyNzc=","url":"https://api.github.com/repos/google/tink/labels/cla:%20yes","name":"cla: yes","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/tink/pulls/149/commits","review_comments_url":"https://api.github.com/repos/google/tink/pulls/149/comments","review_comment_url":"https://api.github.com/repos/google/tink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/tink/issues/149/comments","statuses_url":"https://api.github.com/repos/google/tink/statuses/a8b95f64de0a4242c96009d768c9ef899b74562b","head":{"label":"Gnouc:cuonglm/fix-unhandle-errors","ref":"cuonglm/fix-unhandle-errors","sha":"a8b95f64de0a4242c96009d768c9ef899b74562b","user":{"login":"Gnouc","id":4304764,"node_id":"MDQ6VXNlcjQzMDQ3NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4304764?v=4","gravatar_id":"","url":"https://api.github.com/users/Gnouc","html_url":"https://github.com/Gnouc","followers_url":"https://api.github.com/users/Gnouc/followers","following_url":"https://api.github.com/users/Gnouc/following{/other_user}","gists_url":"https://api.github.com/users/Gnouc/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnouc/subscriptions","organizations_url":"https://api.github.com/users/Gnouc/orgs","repos_url":"https://api.github.com/users/Gnouc/repos","events_url":"https://api.github.com/users/Gnouc/events{/privacy}","received_events_url":"https://api.github.com/users/Gnouc/received_events","type":"User","site_admin":false},"repo":{"id":151689467,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE2ODk0Njc=","name":"tink","full_name":"Gnouc/tink","private":false,"owner":{"login":"Gnouc","id":4304764,"node_id":"MDQ6VXNlcjQzMDQ3NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4304764?v=4","gravatar_id":"","url":"https://api.github.com/users/Gnouc","html_url":"https://github.com/Gnouc","followers_url":"https://api.github.com/users/Gnouc/followers","following_url":"https://api.github.com/users/Gnouc/following{/other_user}","gists_url":"https://api.github.com/users/Gnouc/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnouc/subscriptions","organizations_url":"https://api.github.com/users/Gnouc/orgs","repos_url":"https://api.github.com/users/Gnouc/repos","events_url":"https://api.github.com/users/Gnouc/events{/privacy}","received_events_url":"https://api.github.com/users/Gnouc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Gnouc/tink","description":"Tink is a multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.","fork":true,"url":"https://api.github.com/repos/Gnouc/tink","forks_url":"https://api.github.com/repos/Gnouc/tink/forks","keys_url":"https://api.github.com/repos/Gnouc/tink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gnouc/tink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gnouc/tink/teams","hooks_url":"https://api.github.com/repos/Gnouc/tink/hooks","issue_events_url":"https://api.github.com/repos/Gnouc/tink/issues/events{/number}","events_url":"https://api.github.com/repos/Gnouc/tink/events","assignees_url":"https://api.github.com/repos/Gnouc/tink/assignees{/user}","branches_url":"https://api.github.com/repos/Gnouc/tink/branches{/branch}","tags_url":"https://api.github.com/repos/Gnouc/tink/tags","blobs_url":"https://api.github.com/repos/Gnouc/tink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gnouc/tink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gnouc/tink/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gnouc/tink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gnouc/tink/statuses/{sha}","languages_url":"https://api.github.com/repos/Gnouc/tink/languages","stargazers_url":"https://api.github.com/repos/Gnouc/tink/stargazers","contributors_url":"https://api.github.com/repos/Gnouc/tink/contributors","subscribers_url":"https://api.github.com/repos/Gnouc/tink/subscribers","subscription_url":"https://api.github.com/repos/Gnouc/tink/subscription","commits_url":"https://api.github.com/repos/Gnouc/tink/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gnouc/tink/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gnouc/tink/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gnouc/tink/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gnouc/tink/contents/{+path}","compare_url":"https://api.github.com/repos/Gnouc/tink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gnouc/tink/merges","archive_url":"https://api.github.com/repos/Gnouc/tink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gnouc/tink/downloads","issues_url":"https://api.github.com/repos/Gnouc/tink/issues{/number}","pulls_url":"https://api.github.com/repos/Gnouc/tink/pulls{/number}","milestones_url":"https://api.github.com/repos/Gnouc/tink/milestones{/number}","notifications_url":"https://api.github.com/repos/Gnouc/tink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gnouc/tink/labels{/name}","releases_url":"https://api.github.com/repos/Gnouc/tink/releases{/id}","deployments_url":"https://api.github.com/repos/Gnouc/tink/deployments","created_at":"2018-10-05T08:06:13Z","updated_at":"2018-10-05T08:32:35Z","pushed_at":"2018-10-17T04:36:45Z","git_url":"git://github.com/Gnouc/tink.git","ssh_url":"git@github.com:Gnouc/tink.git","clone_url":"https://github.com/Gnouc/tink.git","svn_url":"https://github.com/Gnouc/tink","homepage":"","size":8811,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"71d1f1b6e63c9bb5a59124264236d1ba107a1f67","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","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":20570214,"node_id":"MDEwOlJlcG9zaXRvcnkyMDU3MDIxNA==","name":"tink","full_name":"google/tink","private":false,"owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","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},"html_url":"https://github.com/google/tink","description":"Tink is a multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.","fork":false,"url":"https://api.github.com/repos/google/tink","forks_url":"https://api.github.com/repos/google/tink/forks","keys_url":"https://api.github.com/repos/google/tink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/tink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/tink/teams","hooks_url":"https://api.github.com/repos/google/tink/hooks","issue_events_url":"https://api.github.com/repos/google/tink/issues/events{/number}","events_url":"https://api.github.com/repos/google/tink/events","assignees_url":"https://api.github.com/repos/google/tink/assignees{/user}","branches_url":"https://api.github.com/repos/google/tink/branches{/branch}","tags_url":"https://api.github.com/repos/google/tink/tags","blobs_url":"https://api.github.com/repos/google/tink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/tink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/tink/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/tink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/tink/statuses/{sha}","languages_url":"https://api.github.com/repos/google/tink/languages","stargazers_url":"https://api.github.com/repos/google/tink/stargazers","contributors_url":"https://api.github.com/repos/google/tink/contributors","subscribers_url":"https://api.github.com/repos/google/tink/subscribers","subscription_url":"https://api.github.com/repos/google/tink/subscription","commits_url":"https://api.github.com/repos/google/tink/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/tink/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/tink/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/tink/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/tink/contents/{+path}","compare_url":"https://api.github.com/repos/google/tink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/tink/merges","archive_url":"https://api.github.com/repos/google/tink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/tink/downloads","issues_url":"https://api.github.com/repos/google/tink/issues{/number}","pulls_url":"https://api.github.com/repos/google/tink/pulls{/number}","milestones_url":"https://api.github.com/repos/google/tink/milestones{/number}","notifications_url":"https://api.github.com/repos/google/tink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/tink/labels{/name}","releases_url":"https://api.github.com/repos/google/tink/releases{/id}","deployments_url":"https://api.github.com/repos/google/tink/deployments","created_at":"2014-06-06T16:21:09Z","updated_at":"2018-10-19T21:58:55Z","pushed_at":"2018-10-19T21:58:53Z","git_url":"git://github.com/google/tink.git","ssh_url":"git@github.com:google/tink.git","clone_url":"https://github.com/google/tink.git","svn_url":"https://github.com/google/tink","homepage":"","size":9455,"stargazers_count":6495,"watchers_count":6495,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":471,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":471,"open_issues":30,"watchers":6495,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/tink/pulls/149"},"html":{"href":"https://github.com/google/tink/pull/149"},"issue":{"href":"https://api.github.com/repos/google/tink/issues/149"},"comments":{"href":"https://api.github.com/repos/google/tink/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/google/tink/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/google/tink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/tink/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/google/tink/statuses/a8b95f64de0a4242c96009d768c9ef899b74562b"}},"author_association":"NONE"}}
{"actor":{"display_login":"thaidn"}}