{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/libweb3core/pulls/comments/40922178","id":40922178,"diff_hunk":"@@ -40,23 +41,18 @@ using namespace dev;\n using namespace dev::crypto;\n \n #ifdef ETH_HAVE_SECP256K1\n-struct Secp256k1Context\n-{\n-\tSecp256k1Context() { ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); }\n-\t~Secp256k1Context() { secp256k1_context_destroy(ctx); }\n-\tsecp256k1_context_t* ctx;\n-\toperator secp256k1_context_t const*() const { return ctx; }\n-};\n-static Secp256k1Context s_secp256k1;\n+std::unique_ptr<secp256k1_context, void(*)(secp256k1_context*)> s_secp256k1(secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY), [](secp256k1_context* _c){ secp256k1_context_destroy(_c); });\n #endif\n \n static Secp256k1PP s_secp256k1pp;\n \n+static h256 const c_curveN(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");","path":"libdevcrypto/Common.cpp","position":25,"original_position":25,"commit_id":"b62413754577c4604d643e95288070da9a599df3","original_commit_id":"b62413754577c4604d643e95288070da9a599df3","user":{"login":"chfast","id":573380,"avatar_url":"https://avatars.githubusercontent.com/u/573380?v=3","gravatar_id":"","url":"https://api.github.com/users/chfast","html_url":"https://github.com/chfast","followers_url":"https://api.github.com/users/chfast/followers","following_url":"https://api.github.com/users/chfast/following{/other_user}","gists_url":"https://api.github.com/users/chfast/gists{/gist_id}","starred_url":"https://api.github.com/users/chfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chfast/subscriptions","organizations_url":"https://api.github.com/users/chfast/orgs","repos_url":"https://api.github.com/users/chfast/repos","events_url":"https://api.github.com/users/chfast/events{/privacy}","received_events_url":"https://api.github.com/users/chfast/received_events","type":"User","site_admin":false},"body":"Place it inside the function.","created_at":"2015-10-01T14:52:26Z","updated_at":"2015-10-01T14:52:26Z","html_url":"https://github.com/ethereum/libweb3core/pull/15#discussion_r40922178","pull_request_url":"https://api.github.com/repos/ethereum/libweb3core/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/comments/40922178"},"html":{"href":"https://github.com/ethereum/libweb3core/pull/15#discussion_r40922178"},"pull_request":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/libweb3core/pulls/15","id":46524692,"html_url":"https://github.com/ethereum/libweb3core/pull/15","diff_url":"https://github.com/ethereum/libweb3core/pull/15.diff","patch_url":"https://github.com/ethereum/libweb3core/pull/15.patch","issue_url":"https://api.github.com/repos/ethereum/libweb3core/issues/15","number":15,"state":"open","locked":false,"title":"ECDH using libsecp256k1","user":{"login":"arkpar","id":9008569,"avatar_url":"https://avatars.githubusercontent.com/u/9008569?v=3","gravatar_id":"","url":"https://api.github.com/users/arkpar","html_url":"https://github.com/arkpar","followers_url":"https://api.github.com/users/arkpar/followers","following_url":"https://api.github.com/users/arkpar/following{/other_user}","gists_url":"https://api.github.com/users/arkpar/gists{/gist_id}","starred_url":"https://api.github.com/users/arkpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkpar/subscriptions","organizations_url":"https://api.github.com/users/arkpar/orgs","repos_url":"https://api.github.com/users/arkpar/repos","events_url":"https://api.github.com/users/arkpar/events{/privacy}","received_events_url":"https://api.github.com/users/arkpar/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-01T13:43:30Z","updated_at":"2015-10-01T14:52:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1403d878479b116d3a56c740b7d7f2f60b8d116","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/libweb3core/pulls/15/commits","review_comments_url":"https://api.github.com/repos/ethereum/libweb3core/pulls/15/comments","review_comment_url":"https://api.github.com/repos/ethereum/libweb3core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/libweb3core/issues/15/comments","statuses_url":"https://api.github.com/repos/ethereum/libweb3core/statuses/b62413754577c4604d643e95288070da9a599df3","head":{"label":"arkpar:crypto","ref":"crypto","sha":"b62413754577c4604d643e95288070da9a599df3","user":{"login":"arkpar","id":9008569,"avatar_url":"https://avatars.githubusercontent.com/u/9008569?v=3","gravatar_id":"","url":"https://api.github.com/users/arkpar","html_url":"https://github.com/arkpar","followers_url":"https://api.github.com/users/arkpar/followers","following_url":"https://api.github.com/users/arkpar/following{/other_user}","gists_url":"https://api.github.com/users/arkpar/gists{/gist_id}","starred_url":"https://api.github.com/users/arkpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkpar/subscriptions","organizations_url":"https://api.github.com/users/arkpar/orgs","repos_url":"https://api.github.com/users/arkpar/repos","events_url":"https://api.github.com/users/arkpar/events{/privacy}","received_events_url":"https://api.github.com/users/arkpar/received_events","type":"User","site_admin":false},"repo":{"id":42589873,"name":"libweb3core","full_name":"arkpar/libweb3core","owner":{"login":"arkpar","id":9008569,"avatar_url":"https://avatars.githubusercontent.com/u/9008569?v=3","gravatar_id":"","url":"https://api.github.com/users/arkpar","html_url":"https://github.com/arkpar","followers_url":"https://api.github.com/users/arkpar/followers","following_url":"https://api.github.com/users/arkpar/following{/other_user}","gists_url":"https://api.github.com/users/arkpar/gists{/gist_id}","starred_url":"https://api.github.com/users/arkpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkpar/subscriptions","organizations_url":"https://api.github.com/users/arkpar/orgs","repos_url":"https://api.github.com/users/arkpar/repos","events_url":"https://api.github.com/users/arkpar/events{/privacy}","received_events_url":"https://api.github.com/users/arkpar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arkpar/libweb3core","description":"Base library for C++ web three stuff","fork":true,"url":"https://api.github.com/repos/arkpar/libweb3core","forks_url":"https://api.github.com/repos/arkpar/libweb3core/forks","keys_url":"https://api.github.com/repos/arkpar/libweb3core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arkpar/libweb3core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arkpar/libweb3core/teams","hooks_url":"https://api.github.com/repos/arkpar/libweb3core/hooks","issue_events_url":"https://api.github.com/repos/arkpar/libweb3core/issues/events{/number}","events_url":"https://api.github.com/repos/arkpar/libweb3core/events","assignees_url":"https://api.github.com/repos/arkpar/libweb3core/assignees{/user}","branches_url":"https://api.github.com/repos/arkpar/libweb3core/branches{/branch}","tags_url":"https://api.github.com/repos/arkpar/libweb3core/tags","blobs_url":"https://api.github.com/repos/arkpar/libweb3core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arkpar/libweb3core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arkpar/libweb3core/git/refs{/sha}","trees_url":"https://api.github.com/repos/arkpar/libweb3core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arkpar/libweb3core/statuses/{sha}","languages_url":"https://api.github.com/repos/arkpar/libweb3core/languages","stargazers_url":"https://api.github.com/repos/arkpar/libweb3core/stargazers","contributors_url":"https://api.github.com/repos/arkpar/libweb3core/contributors","subscribers_url":"https://api.github.com/repos/arkpar/libweb3core/subscribers","subscription_url":"https://api.github.com/repos/arkpar/libweb3core/subscription","commits_url":"https://api.github.com/repos/arkpar/libweb3core/commits{/sha}","git_commits_url":"https://api.github.com/repos/arkpar/libweb3core/git/commits{/sha}","comments_url":"https://api.github.com/repos/arkpar/libweb3core/comments{/number}","issue_comment_url":"https://api.github.com/repos/arkpar/libweb3core/issues/comments{/number}","contents_url":"https://api.github.com/repos/arkpar/libweb3core/contents/{+path}","compare_url":"https://api.github.com/repos/arkpar/libweb3core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arkpar/libweb3core/merges","archive_url":"https://api.github.com/repos/arkpar/libweb3core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arkpar/libweb3core/downloads","issues_url":"https://api.github.com/repos/arkpar/libweb3core/issues{/number}","pulls_url":"https://api.github.com/repos/arkpar/libweb3core/pulls{/number}","milestones_url":"https://api.github.com/repos/arkpar/libweb3core/milestones{/number}","notifications_url":"https://api.github.com/repos/arkpar/libweb3core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arkpar/libweb3core/labels{/name}","releases_url":"https://api.github.com/repos/arkpar/libweb3core/releases{/id}","created_at":"2015-09-16T13:46:59Z","updated_at":"2015-09-16T13:47:00Z","pushed_at":"2015-10-01T13:43:10Z","git_url":"git://github.com/arkpar/libweb3core.git","ssh_url":"git@github.com:arkpar/libweb3core.git","clone_url":"https://github.com/arkpar/libweb3core.git","svn_url":"https://github.com/arkpar/libweb3core","homepage":null,"size":2531,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"d770ef17f050c5fd746255570c0c5a5fcc812c9c","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":42070294,"name":"libweb3core","full_name":"ethereum/libweb3core","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/libweb3core","description":"Base library for C++ web three stuff","fork":false,"url":"https://api.github.com/repos/ethereum/libweb3core","forks_url":"https://api.github.com/repos/ethereum/libweb3core/forks","keys_url":"https://api.github.com/repos/ethereum/libweb3core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/libweb3core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/libweb3core/teams","hooks_url":"https://api.github.com/repos/ethereum/libweb3core/hooks","issue_events_url":"https://api.github.com/repos/ethereum/libweb3core/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/libweb3core/events","assignees_url":"https://api.github.com/repos/ethereum/libweb3core/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/libweb3core/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/libweb3core/tags","blobs_url":"https://api.github.com/repos/ethereum/libweb3core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/libweb3core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/libweb3core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/libweb3core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/libweb3core/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/libweb3core/languages","stargazers_url":"https://api.github.com/repos/ethereum/libweb3core/stargazers","contributors_url":"https://api.github.com/repos/ethereum/libweb3core/contributors","subscribers_url":"https://api.github.com/repos/ethereum/libweb3core/subscribers","subscription_url":"https://api.github.com/repos/ethereum/libweb3core/subscription","commits_url":"https://api.github.com/repos/ethereum/libweb3core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/libweb3core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/libweb3core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/libweb3core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/libweb3core/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/libweb3core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/libweb3core/merges","archive_url":"https://api.github.com/repos/ethereum/libweb3core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/libweb3core/downloads","issues_url":"https://api.github.com/repos/ethereum/libweb3core/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/libweb3core/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/libweb3core/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/libweb3core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/libweb3core/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/libweb3core/releases{/id}","created_at":"2015-09-07T19:16:39Z","updated_at":"2015-09-08T08:32:08Z","pushed_at":"2015-10-01T13:43:30Z","git_url":"git://github.com/ethereum/libweb3core.git","ssh_url":"git@github.com:ethereum/libweb3core.git","clone_url":"https://github.com/ethereum/libweb3core.git","svn_url":"https://github.com/ethereum/libweb3core","homepage":null,"size":2938,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":7,"forks":6,"open_issues":7,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/15"},"html":{"href":"https://github.com/ethereum/libweb3core/pull/15"},"issue":{"href":"https://api.github.com/repos/ethereum/libweb3core/issues/15"},"comments":{"href":"https://api.github.com/repos/ethereum/libweb3core/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/libweb3core/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/libweb3core/statuses/b62413754577c4604d643e95288070da9a599df3"}}}}