{"action":"created","comment":{"url":"https://api.github.com/repos/leapcode/soledad/pulls/comments/36181206","id":36181206,"diff_hunk":"@@ -57,7 +57,7 @@ def _assert_known_encryption_method(method):\n         raise crypto.UnknownEncryptionMethodError\n \n \n-def encrypt_sym(data, key, method):\n+def encrypt_sym(data, key, method=crypto.EncryptionMethods.AES_256_CTR):","path":"client/src/leap/soledad/client/crypto.py","position":5,"original_position":5,"commit_id":"4e0004e0b647b235f0bd4fe8f1c5d1af7e39e15d","original_commit_id":"4e0004e0b647b235f0bd4fe8f1c5d1af7e39e15d","user":{"login":"fbernitt","id":108677,"avatar_url":"https://avatars.githubusercontent.com/u/108677?v=3","gravatar_id":"","url":"https://api.github.com/users/fbernitt","html_url":"https://github.com/fbernitt","followers_url":"https://api.github.com/users/fbernitt/followers","following_url":"https://api.github.com/users/fbernitt/following{/other_user}","gists_url":"https://api.github.com/users/fbernitt/gists{/gist_id}","starred_url":"https://api.github.com/users/fbernitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbernitt/subscriptions","organizations_url":"https://api.github.com/users/fbernitt/orgs","repos_url":"https://api.github.com/users/fbernitt/repos","events_url":"https://api.github.com/users/fbernitt/events{/privacy}","received_events_url":"https://api.github.com/users/fbernitt/received_events","type":"User","site_admin":false},"body":"Seems to me that it's always crypto.EncryptionMethods.AES_256_CTR, something else is only used within the tests. (decrypt_sym gets a method from decrypt_doc, which is also the AES_256, but read from the document). Perhaps just remove the parameter here to make it more obvious that AES_256_CTR is the only choice atm? XSALSA20 is only used by tests.\r\n","created_at":"2015-08-04T12:21:19Z","updated_at":"2015-08-04T12:21:19Z","html_url":"https://github.com/leapcode/soledad/pull/241#discussion_r36181206","pull_request_url":"https://api.github.com/repos/leapcode/soledad/pulls/241","_links":{"self":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/comments/36181206"},"html":{"href":"https://github.com/leapcode/soledad/pull/241#discussion_r36181206"},"pull_request":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/leapcode/soledad/pulls/241","id":41550551,"html_url":"https://github.com/leapcode/soledad/pull/241","diff_url":"https://github.com/leapcode/soledad/pull/241.diff","patch_url":"https://github.com/leapcode/soledad/pull/241.patch","issue_url":"https://api.github.com/repos/leapcode/soledad/issues/241","number":241,"state":"open","locked":false,"title":"[refactor] remove circular dependency in SoledadCrypto","user":{"login":"meskio","id":475542,"avatar_url":"https://avatars.githubusercontent.com/u/475542?v=3","gravatar_id":"","url":"https://api.github.com/users/meskio","html_url":"https://github.com/meskio","followers_url":"https://api.github.com/users/meskio/followers","following_url":"https://api.github.com/users/meskio/following{/other_user}","gists_url":"https://api.github.com/users/meskio/gists{/gist_id}","starred_url":"https://api.github.com/users/meskio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meskio/subscriptions","organizations_url":"https://api.github.com/users/meskio/orgs","repos_url":"https://api.github.com/users/meskio/repos","events_url":"https://api.github.com/users/meskio/events{/privacy}","received_events_url":"https://api.github.com/users/meskio/received_events","type":"User","site_admin":false},"body":"SoledadCrypto had Soledad as parameter to be able to use\r\nSoledadSecrets. SoledadSecrets had SoledadCrypto as parameter to use\r\n*crypt_sym. This commit removes this circular dependency passing\r\ndirectly the secret that SoledadCrypto cares about to the constructor\r\nand removing the *crypt_sym methods from SoledadCrypto.\r\n\r\n- Resolves: #7338","created_at":"2015-08-04T09:33:39Z","updated_at":"2015-08-04T12:21:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89a386a300947788185745b0921edad4674a6fe8","assignee":{"login":"andrejb","id":79672,"avatar_url":"https://avatars.githubusercontent.com/u/79672?v=3","gravatar_id":"","url":"https://api.github.com/users/andrejb","html_url":"https://github.com/andrejb","followers_url":"https://api.github.com/users/andrejb/followers","following_url":"https://api.github.com/users/andrejb/following{/other_user}","gists_url":"https://api.github.com/users/andrejb/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejb/subscriptions","organizations_url":"https://api.github.com/users/andrejb/orgs","repos_url":"https://api.github.com/users/andrejb/repos","events_url":"https://api.github.com/users/andrejb/events{/privacy}","received_events_url":"https://api.github.com/users/andrejb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/leapcode/soledad/pulls/241/commits","review_comments_url":"https://api.github.com/repos/leapcode/soledad/pulls/241/comments","review_comment_url":"https://api.github.com/repos/leapcode/soledad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leapcode/soledad/issues/241/comments","statuses_url":"https://api.github.com/repos/leapcode/soledad/statuses/4e0004e0b647b235f0bd4fe8f1c5d1af7e39e15d","head":{"label":"meskio:feature/7338_refactor_crypto","ref":"feature/7338_refactor_crypto","sha":"4e0004e0b647b235f0bd4fe8f1c5d1af7e39e15d","user":{"login":"meskio","id":475542,"avatar_url":"https://avatars.githubusercontent.com/u/475542?v=3","gravatar_id":"","url":"https://api.github.com/users/meskio","html_url":"https://github.com/meskio","followers_url":"https://api.github.com/users/meskio/followers","following_url":"https://api.github.com/users/meskio/following{/other_user}","gists_url":"https://api.github.com/users/meskio/gists{/gist_id}","starred_url":"https://api.github.com/users/meskio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meskio/subscriptions","organizations_url":"https://api.github.com/users/meskio/orgs","repos_url":"https://api.github.com/users/meskio/repos","events_url":"https://api.github.com/users/meskio/events{/privacy}","received_events_url":"https://api.github.com/users/meskio/received_events","type":"User","site_admin":false},"repo":{"id":32860013,"name":"soledad","full_name":"meskio/soledad","owner":{"login":"meskio","id":475542,"avatar_url":"https://avatars.githubusercontent.com/u/475542?v=3","gravatar_id":"","url":"https://api.github.com/users/meskio","html_url":"https://github.com/meskio","followers_url":"https://api.github.com/users/meskio/followers","following_url":"https://api.github.com/users/meskio/following{/other_user}","gists_url":"https://api.github.com/users/meskio/gists{/gist_id}","starred_url":"https://api.github.com/users/meskio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meskio/subscriptions","organizations_url":"https://api.github.com/users/meskio/orgs","repos_url":"https://api.github.com/users/meskio/repos","events_url":"https://api.github.com/users/meskio/events{/privacy}","received_events_url":"https://api.github.com/users/meskio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meskio/soledad","description":"Synchronization Of Locally Encrypted Data Among Devices","fork":true,"url":"https://api.github.com/repos/meskio/soledad","forks_url":"https://api.github.com/repos/meskio/soledad/forks","keys_url":"https://api.github.com/repos/meskio/soledad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meskio/soledad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meskio/soledad/teams","hooks_url":"https://api.github.com/repos/meskio/soledad/hooks","issue_events_url":"https://api.github.com/repos/meskio/soledad/issues/events{/number}","events_url":"https://api.github.com/repos/meskio/soledad/events","assignees_url":"https://api.github.com/repos/meskio/soledad/assignees{/user}","branches_url":"https://api.github.com/repos/meskio/soledad/branches{/branch}","tags_url":"https://api.github.com/repos/meskio/soledad/tags","blobs_url":"https://api.github.com/repos/meskio/soledad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meskio/soledad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meskio/soledad/git/refs{/sha}","trees_url":"https://api.github.com/repos/meskio/soledad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meskio/soledad/statuses/{sha}","languages_url":"https://api.github.com/repos/meskio/soledad/languages","stargazers_url":"https://api.github.com/repos/meskio/soledad/stargazers","contributors_url":"https://api.github.com/repos/meskio/soledad/contributors","subscribers_url":"https://api.github.com/repos/meskio/soledad/subscribers","subscription_url":"https://api.github.com/repos/meskio/soledad/subscription","commits_url":"https://api.github.com/repos/meskio/soledad/commits{/sha}","git_commits_url":"https://api.github.com/repos/meskio/soledad/git/commits{/sha}","comments_url":"https://api.github.com/repos/meskio/soledad/comments{/number}","issue_comment_url":"https://api.github.com/repos/meskio/soledad/issues/comments{/number}","contents_url":"https://api.github.com/repos/meskio/soledad/contents/{+path}","compare_url":"https://api.github.com/repos/meskio/soledad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meskio/soledad/merges","archive_url":"https://api.github.com/repos/meskio/soledad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meskio/soledad/downloads","issues_url":"https://api.github.com/repos/meskio/soledad/issues{/number}","pulls_url":"https://api.github.com/repos/meskio/soledad/pulls{/number}","milestones_url":"https://api.github.com/repos/meskio/soledad/milestones{/number}","notifications_url":"https://api.github.com/repos/meskio/soledad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meskio/soledad/labels{/name}","releases_url":"https://api.github.com/repos/meskio/soledad/releases{/id}","created_at":"2015-03-25T11:19:28Z","updated_at":"2015-03-25T11:19:29Z","pushed_at":"2015-08-04T09:59:36Z","git_url":"git://github.com/meskio/soledad.git","ssh_url":"git@github.com:meskio/soledad.git","clone_url":"https://github.com/meskio/soledad.git","svn_url":"https://github.com/meskio/soledad","homepage":"https://leap.se/en/docs/soledad","size":2547,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"leapcode:develop","ref":"develop","sha":"0d8455007283fba00fa1747a30974de12fbe251c","user":{"login":"leapcode","id":1700464,"avatar_url":"https://avatars.githubusercontent.com/u/1700464?v=3","gravatar_id":"","url":"https://api.github.com/users/leapcode","html_url":"https://github.com/leapcode","followers_url":"https://api.github.com/users/leapcode/followers","following_url":"https://api.github.com/users/leapcode/following{/other_user}","gists_url":"https://api.github.com/users/leapcode/gists{/gist_id}","starred_url":"https://api.github.com/users/leapcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapcode/subscriptions","organizations_url":"https://api.github.com/users/leapcode/orgs","repos_url":"https://api.github.com/users/leapcode/repos","events_url":"https://api.github.com/users/leapcode/events{/privacy}","received_events_url":"https://api.github.com/users/leapcode/received_events","type":"Organization","site_admin":false},"repo":{"id":9917542,"name":"soledad","full_name":"leapcode/soledad","owner":{"login":"leapcode","id":1700464,"avatar_url":"https://avatars.githubusercontent.com/u/1700464?v=3","gravatar_id":"","url":"https://api.github.com/users/leapcode","html_url":"https://github.com/leapcode","followers_url":"https://api.github.com/users/leapcode/followers","following_url":"https://api.github.com/users/leapcode/following{/other_user}","gists_url":"https://api.github.com/users/leapcode/gists{/gist_id}","starred_url":"https://api.github.com/users/leapcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapcode/subscriptions","organizations_url":"https://api.github.com/users/leapcode/orgs","repos_url":"https://api.github.com/users/leapcode/repos","events_url":"https://api.github.com/users/leapcode/events{/privacy}","received_events_url":"https://api.github.com/users/leapcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leapcode/soledad","description":"Synchronization Of Locally Encrypted Data Among Devices","fork":false,"url":"https://api.github.com/repos/leapcode/soledad","forks_url":"https://api.github.com/repos/leapcode/soledad/forks","keys_url":"https://api.github.com/repos/leapcode/soledad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leapcode/soledad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leapcode/soledad/teams","hooks_url":"https://api.github.com/repos/leapcode/soledad/hooks","issue_events_url":"https://api.github.com/repos/leapcode/soledad/issues/events{/number}","events_url":"https://api.github.com/repos/leapcode/soledad/events","assignees_url":"https://api.github.com/repos/leapcode/soledad/assignees{/user}","branches_url":"https://api.github.com/repos/leapcode/soledad/branches{/branch}","tags_url":"https://api.github.com/repos/leapcode/soledad/tags","blobs_url":"https://api.github.com/repos/leapcode/soledad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leapcode/soledad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leapcode/soledad/git/refs{/sha}","trees_url":"https://api.github.com/repos/leapcode/soledad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leapcode/soledad/statuses/{sha}","languages_url":"https://api.github.com/repos/leapcode/soledad/languages","stargazers_url":"https://api.github.com/repos/leapcode/soledad/stargazers","contributors_url":"https://api.github.com/repos/leapcode/soledad/contributors","subscribers_url":"https://api.github.com/repos/leapcode/soledad/subscribers","subscription_url":"https://api.github.com/repos/leapcode/soledad/subscription","commits_url":"https://api.github.com/repos/leapcode/soledad/commits{/sha}","git_commits_url":"https://api.github.com/repos/leapcode/soledad/git/commits{/sha}","comments_url":"https://api.github.com/repos/leapcode/soledad/comments{/number}","issue_comment_url":"https://api.github.com/repos/leapcode/soledad/issues/comments{/number}","contents_url":"https://api.github.com/repos/leapcode/soledad/contents/{+path}","compare_url":"https://api.github.com/repos/leapcode/soledad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leapcode/soledad/merges","archive_url":"https://api.github.com/repos/leapcode/soledad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leapcode/soledad/downloads","issues_url":"https://api.github.com/repos/leapcode/soledad/issues{/number}","pulls_url":"https://api.github.com/repos/leapcode/soledad/pulls{/number}","milestones_url":"https://api.github.com/repos/leapcode/soledad/milestones{/number}","notifications_url":"https://api.github.com/repos/leapcode/soledad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leapcode/soledad/labels{/name}","releases_url":"https://api.github.com/repos/leapcode/soledad/releases{/id}","created_at":"2013-05-07T17:30:44Z","updated_at":"2015-05-28T01:32:04Z","pushed_at":"2015-08-04T09:59:37Z","git_url":"git://github.com/leapcode/soledad.git","ssh_url":"git@github.com:leapcode/soledad.git","clone_url":"https://github.com/leapcode/soledad.git","svn_url":"https://github.com/leapcode/soledad","homepage":"https://leap.se/en/docs/soledad","size":4555,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":2,"forks":18,"open_issues":2,"watchers":19,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/241"},"html":{"href":"https://github.com/leapcode/soledad/pull/241"},"issue":{"href":"https://api.github.com/repos/leapcode/soledad/issues/241"},"comments":{"href":"https://api.github.com/repos/leapcode/soledad/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leapcode/soledad/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/leapcode/soledad/statuses/4e0004e0b647b235f0bd4fe8f1c5d1af7e39e15d"}}}}