{"action":"created","comment":{"url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/comments/165238161","pull_request_review_id":93143258,"id":165238161,"diff_hunk":"@@ -30,66 +33,80 @@\n import random from './random.js';\n import cipher from './cipher';\n import publicKey from './public_key';\n+import type_ecdh_symkey from '../type/ecdh_symkey.js';\n+import type_kdf_params from '../type/kdf_params.js';\n import type_mpi from '../type/mpi.js';\n+import type_oid from '../type/oid.js';\n+\n+\n+function constructParams(types, data) {\n+  return types.map(function(type, i) {\n+    if (data && data[i]) {\n+      return new type(data[i]);\n+    } else {\n+      return new type();\n+    }\n+  });\n+}\n \n export default {\n   /**\n    * Encrypts data using the specified public key multiprecision integers\n    * and the specified algorithm.\n    * @param {module:enums.publicKey} algo Algorithm to be used (See {@link http://tools.ietf.org/html/rfc4880#section-9.1|RFC 4880 9.1})\n-   * @param {Array<module:type/mpi>} publicMPIs Algorithm dependent multiprecision integers\n+   * @param {Array<module:type/mpi|module:type/oid|module:type/kdf|module:type/ecdh_symkey>} publicParams Algorithm dependent params\n    * @param {module:type/mpi} data Data to be encrypted as MPI\n-   * @return {Array<module:type/mpi>} if RSA an module:type/mpi;","path":"src/crypto/crypto.js","position":39,"original_position":39,"commit_id":"d97bc064eaaf8a9af6c320d92873991045b31d67","original_commit_id":"d97bc064eaaf8a9af6c320d92873991045b31d67","user":{"login":"mahrud","id":3147718,"avatar_url":"https://avatars3.githubusercontent.com/u/3147718?v=4","gravatar_id":"","url":"https://api.github.com/users/mahrud","html_url":"https://github.com/mahrud","followers_url":"https://api.github.com/users/mahrud/followers","following_url":"https://api.github.com/users/mahrud/following{/other_user}","gists_url":"https://api.github.com/users/mahrud/gists{/gist_id}","starred_url":"https://api.github.com/users/mahrud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahrud/subscriptions","organizations_url":"https://api.github.com/users/mahrud/orgs","repos_url":"https://api.github.com/users/mahrud/repos","events_url":"https://api.github.com/users/mahrud/events{/privacy}","received_events_url":"https://api.github.com/users/mahrud/received_events","type":"User","site_admin":false},"body":"Nice catch! (lol at calling out the user 'param')\r\n`publicKeyDecrypt` was also missing a parameter documentation.\r\nLine 103 is still not quite accurate: `keyIntegers` can have up to 6 members but they're not defined. @sanjanarajan any ideas?","created_at":"2018-02-01T01:28:25Z","updated_at":"2018-02-01T01:28:25Z","html_url":"https://github.com/openpgpjs/openpgpjs/pull/628#discussion_r165238161","pull_request_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/comments/165238161"},"html":{"href":"https://github.com/openpgpjs/openpgpjs/pull/628#discussion_r165238161"},"pull_request":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628"}},"in_reply_to_id":165203174},"pull_request":{"url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628","id":166021977,"html_url":"https://github.com/openpgpjs/openpgpjs/pull/628","diff_url":"https://github.com/openpgpjs/openpgpjs/pull/628.diff","patch_url":"https://github.com/openpgpjs/openpgpjs/pull/628.patch","issue_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/628","number":628,"state":"open","locked":false,"title":"Support for curves P256, P384, P521, SECP256K1, Ed25519/Curve25519","user":{"login":"sanjanarajan","id":6510011,"avatar_url":"https://avatars2.githubusercontent.com/u/6510011?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjanarajan","html_url":"https://github.com/sanjanarajan","followers_url":"https://api.github.com/users/sanjanarajan/followers","following_url":"https://api.github.com/users/sanjanarajan/following{/other_user}","gists_url":"https://api.github.com/users/sanjanarajan/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjanarajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjanarajan/subscriptions","organizations_url":"https://api.github.com/users/sanjanarajan/orgs","repos_url":"https://api.github.com/users/sanjanarajan/repos","events_url":"https://api.github.com/users/sanjanarajan/events{/privacy}","received_events_url":"https://api.github.com/users/sanjanarajan/received_events","type":"User","site_admin":false},"body":"This branch combines pull request #484 from @ismaelbej and pull request #618 from @mahrud to complete ECC support.\r\nWhen available, key generation and signing/verifying with P-256, P-384, and P-521 curves use webCrypto/nodeCrypto. ","created_at":"2018-01-30T15:59:32Z","updated_at":"2018-02-01T01:28:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af7bbda8ac967f56671d91cbb3eafac51a6dc8a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628/commits","review_comments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628/comments","review_comment_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/628/comments","statuses_url":"https://api.github.com/repos/openpgpjs/openpgpjs/statuses/d97bc064eaaf8a9af6c320d92873991045b31d67","head":{"label":"openpgpjs:ecc_nist","ref":"ecc_nist","sha":"d97bc064eaaf8a9af6c320d92873991045b31d67","user":{"login":"openpgpjs","id":1206249,"avatar_url":"https://avatars3.githubusercontent.com/u/1206249?v=4","gravatar_id":"","url":"https://api.github.com/users/openpgpjs","html_url":"https://github.com/openpgpjs","followers_url":"https://api.github.com/users/openpgpjs/followers","following_url":"https://api.github.com/users/openpgpjs/following{/other_user}","gists_url":"https://api.github.com/users/openpgpjs/gists{/gist_id}","starred_url":"https://api.github.com/users/openpgpjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpgpjs/subscriptions","organizations_url":"https://api.github.com/users/openpgpjs/orgs","repos_url":"https://api.github.com/users/openpgpjs/repos","events_url":"https://api.github.com/users/openpgpjs/events{/privacy}","received_events_url":"https://api.github.com/users/openpgpjs/received_events","type":"Organization","site_admin":false},"repo":{"id":2765899,"name":"openpgpjs","full_name":"openpgpjs/openpgpjs","owner":{"login":"openpgpjs","id":1206249,"avatar_url":"https://avatars3.githubusercontent.com/u/1206249?v=4","gravatar_id":"","url":"https://api.github.com/users/openpgpjs","html_url":"https://github.com/openpgpjs","followers_url":"https://api.github.com/users/openpgpjs/followers","following_url":"https://api.github.com/users/openpgpjs/following{/other_user}","gists_url":"https://api.github.com/users/openpgpjs/gists{/gist_id}","starred_url":"https://api.github.com/users/openpgpjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpgpjs/subscriptions","organizations_url":"https://api.github.com/users/openpgpjs/orgs","repos_url":"https://api.github.com/users/openpgpjs/repos","events_url":"https://api.github.com/users/openpgpjs/events{/privacy}","received_events_url":"https://api.github.com/users/openpgpjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openpgpjs/openpgpjs","description":"OpenPGP implementation for JavaScript","fork":false,"url":"https://api.github.com/repos/openpgpjs/openpgpjs","forks_url":"https://api.github.com/repos/openpgpjs/openpgpjs/forks","keys_url":"https://api.github.com/repos/openpgpjs/openpgpjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openpgpjs/openpgpjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openpgpjs/openpgpjs/teams","hooks_url":"https://api.github.com/repos/openpgpjs/openpgpjs/hooks","issue_events_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/events{/number}","events_url":"https://api.github.com/repos/openpgpjs/openpgpjs/events","assignees_url":"https://api.github.com/repos/openpgpjs/openpgpjs/assignees{/user}","branches_url":"https://api.github.com/repos/openpgpjs/openpgpjs/branches{/branch}","tags_url":"https://api.github.com/repos/openpgpjs/openpgpjs/tags","blobs_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openpgpjs/openpgpjs/statuses/{sha}","languages_url":"https://api.github.com/repos/openpgpjs/openpgpjs/languages","stargazers_url":"https://api.github.com/repos/openpgpjs/openpgpjs/stargazers","contributors_url":"https://api.github.com/repos/openpgpjs/openpgpjs/contributors","subscribers_url":"https://api.github.com/repos/openpgpjs/openpgpjs/subscribers","subscription_url":"https://api.github.com/repos/openpgpjs/openpgpjs/subscription","commits_url":"https://api.github.com/repos/openpgpjs/openpgpjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/openpgpjs/openpgpjs/contents/{+path}","compare_url":"https://api.github.com/repos/openpgpjs/openpgpjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openpgpjs/openpgpjs/merges","archive_url":"https://api.github.com/repos/openpgpjs/openpgpjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openpgpjs/openpgpjs/downloads","issues_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues{/number}","pulls_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls{/number}","milestones_url":"https://api.github.com/repos/openpgpjs/openpgpjs/milestones{/number}","notifications_url":"https://api.github.com/repos/openpgpjs/openpgpjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openpgpjs/openpgpjs/labels{/name}","releases_url":"https://api.github.com/repos/openpgpjs/openpgpjs/releases{/id}","deployments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/deployments","created_at":"2011-11-13T10:36:43Z","updated_at":"2018-01-31T22:22:59Z","pushed_at":"2018-01-31T20:25:51Z","git_url":"git://github.com/openpgpjs/openpgpjs.git","ssh_url":"git@github.com:openpgpjs/openpgpjs.git","clone_url":"https://github.com/openpgpjs/openpgpjs.git","svn_url":"https://github.com/openpgpjs/openpgpjs","homepage":"https://openpgpjs.org","size":21828,"stargazers_count":2876,"watchers_count":2876,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":434,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":434,"open_issues":100,"watchers":2876,"default_branch":"master"}},"base":{"label":"openpgpjs:master","ref":"master","sha":"b22f84f9b9ca83022e369736a2ca4af02f3e95a3","user":{"login":"openpgpjs","id":1206249,"avatar_url":"https://avatars3.githubusercontent.com/u/1206249?v=4","gravatar_id":"","url":"https://api.github.com/users/openpgpjs","html_url":"https://github.com/openpgpjs","followers_url":"https://api.github.com/users/openpgpjs/followers","following_url":"https://api.github.com/users/openpgpjs/following{/other_user}","gists_url":"https://api.github.com/users/openpgpjs/gists{/gist_id}","starred_url":"https://api.github.com/users/openpgpjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpgpjs/subscriptions","organizations_url":"https://api.github.com/users/openpgpjs/orgs","repos_url":"https://api.github.com/users/openpgpjs/repos","events_url":"https://api.github.com/users/openpgpjs/events{/privacy}","received_events_url":"https://api.github.com/users/openpgpjs/received_events","type":"Organization","site_admin":false},"repo":{"id":2765899,"name":"openpgpjs","full_name":"openpgpjs/openpgpjs","owner":{"login":"openpgpjs","id":1206249,"avatar_url":"https://avatars3.githubusercontent.com/u/1206249?v=4","gravatar_id":"","url":"https://api.github.com/users/openpgpjs","html_url":"https://github.com/openpgpjs","followers_url":"https://api.github.com/users/openpgpjs/followers","following_url":"https://api.github.com/users/openpgpjs/following{/other_user}","gists_url":"https://api.github.com/users/openpgpjs/gists{/gist_id}","starred_url":"https://api.github.com/users/openpgpjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openpgpjs/subscriptions","organizations_url":"https://api.github.com/users/openpgpjs/orgs","repos_url":"https://api.github.com/users/openpgpjs/repos","events_url":"https://api.github.com/users/openpgpjs/events{/privacy}","received_events_url":"https://api.github.com/users/openpgpjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openpgpjs/openpgpjs","description":"OpenPGP implementation for JavaScript","fork":false,"url":"https://api.github.com/repos/openpgpjs/openpgpjs","forks_url":"https://api.github.com/repos/openpgpjs/openpgpjs/forks","keys_url":"https://api.github.com/repos/openpgpjs/openpgpjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openpgpjs/openpgpjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openpgpjs/openpgpjs/teams","hooks_url":"https://api.github.com/repos/openpgpjs/openpgpjs/hooks","issue_events_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/events{/number}","events_url":"https://api.github.com/repos/openpgpjs/openpgpjs/events","assignees_url":"https://api.github.com/repos/openpgpjs/openpgpjs/assignees{/user}","branches_url":"https://api.github.com/repos/openpgpjs/openpgpjs/branches{/branch}","tags_url":"https://api.github.com/repos/openpgpjs/openpgpjs/tags","blobs_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openpgpjs/openpgpjs/statuses/{sha}","languages_url":"https://api.github.com/repos/openpgpjs/openpgpjs/languages","stargazers_url":"https://api.github.com/repos/openpgpjs/openpgpjs/stargazers","contributors_url":"https://api.github.com/repos/openpgpjs/openpgpjs/contributors","subscribers_url":"https://api.github.com/repos/openpgpjs/openpgpjs/subscribers","subscription_url":"https://api.github.com/repos/openpgpjs/openpgpjs/subscription","commits_url":"https://api.github.com/repos/openpgpjs/openpgpjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/openpgpjs/openpgpjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/openpgpjs/openpgpjs/contents/{+path}","compare_url":"https://api.github.com/repos/openpgpjs/openpgpjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openpgpjs/openpgpjs/merges","archive_url":"https://api.github.com/repos/openpgpjs/openpgpjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openpgpjs/openpgpjs/downloads","issues_url":"https://api.github.com/repos/openpgpjs/openpgpjs/issues{/number}","pulls_url":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls{/number}","milestones_url":"https://api.github.com/repos/openpgpjs/openpgpjs/milestones{/number}","notifications_url":"https://api.github.com/repos/openpgpjs/openpgpjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openpgpjs/openpgpjs/labels{/name}","releases_url":"https://api.github.com/repos/openpgpjs/openpgpjs/releases{/id}","deployments_url":"https://api.github.com/repos/openpgpjs/openpgpjs/deployments","created_at":"2011-11-13T10:36:43Z","updated_at":"2018-01-31T22:22:59Z","pushed_at":"2018-01-31T20:25:51Z","git_url":"git://github.com/openpgpjs/openpgpjs.git","ssh_url":"git@github.com:openpgpjs/openpgpjs.git","clone_url":"https://github.com/openpgpjs/openpgpjs.git","svn_url":"https://github.com/openpgpjs/openpgpjs","homepage":"https://openpgpjs.org","size":21828,"stargazers_count":2876,"watchers_count":2876,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":434,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":434,"open_issues":100,"watchers":2876,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628"},"html":{"href":"https://github.com/openpgpjs/openpgpjs/pull/628"},"issue":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/628"},"comments":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/issues/628/comments"},"review_comments":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628/comments"},"review_comment":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/pulls/628/commits"},"statuses":{"href":"https://api.github.com/repos/openpgpjs/openpgpjs/statuses/d97bc064eaaf8a9af6c320d92873991045b31d67"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mahrud"}}