{"action":"created","comment":{"url":"https://api.github.com/repos/tozny/e3db-java/pulls/comments/196978481","pull_request_review_id":130629959,"id":196978481,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njk3ODQ4MQ==","diff_hunk":"@@ -907,6 +910,26 @@ private static LocalEAKInfo toLocalEAK(EAKInfo eakInfo) {\n       return new LocalEAKInfo(eakInfo.getKey(), eakInfo.getPublicKey(), eakInfo.getAuthorizerId(), eakInfo.getSignerId(), eakInfo.getSignerSigningKey());\n   }\n \n+  private Map<String,Object> makeFileMeta(File encryptedFile) throws IOException, NoSuchAlgorithmException {\n+    Map<String, Object> fileMeta = new HashMap<>();\n+    fileMeta.put(\"compression\", \"raw\");\n+    MessageDigest digest = MessageDigest.getInstance(\"MD5\");\n+    FileChannel channel = new FileInputStream(encryptedFile).getChannel();\n+    ByteBuffer buffer = ByteBuffer.wrap(new byte[Platform.crypto.getBlockSize()]);\n+    try {\n+      for (int amt = channel.read(buffer); amt != -1; amt = channel.read(buffer)) {\n+        buffer.flip();\n+        digest.update(buffer);\n+        buffer.clear();\n+      }\n+    } finally {\n+      channel.close();\n+    }\n+\n+    fileMeta.put(\"checksum\", Base64.encodeURL(digest.digest()));","path":"e3db/src/main/java/com/tozny/e3db/Client.java","position":70,"original_position":70,"commit_id":"ef9990aae5e25a2d1f33dd52c22da80e0cbcdcd3","original_commit_id":"ef9990aae5e25a2d1f33dd52c22da80e0cbcdcd3","user":{"login":"m4dc4p","id":18689,"node_id":"MDQ6VXNlcjE4Njg5","avatar_url":"https://avatars2.githubusercontent.com/u/18689?v=4","gravatar_id":"","url":"https://api.github.com/users/m4dc4p","html_url":"https://github.com/m4dc4p","followers_url":"https://api.github.com/users/m4dc4p/followers","following_url":"https://api.github.com/users/m4dc4p/following{/other_user}","gists_url":"https://api.github.com/users/m4dc4p/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dc4p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dc4p/subscriptions","organizations_url":"https://api.github.com/users/m4dc4p/orgs","repos_url":"https://api.github.com/users/m4dc4p/repos","events_url":"https://api.github.com/users/m4dc4p/events{/privacy}","received_events_url":"https://api.github.com/users/m4dc4p/received_events","type":"User","site_admin":false},"body":"This value is sent to E3DB, which AFAIK is Base64-URL encoded. However - the spec doesn't say - https://github.com/tozny/api-specs/blob/master/e3db/e3db.swagger.yml#L1239. @lkwdwrd ?","created_at":"2018-06-21T00:08:18Z","updated_at":"2018-06-21T00:08:19Z","html_url":"https://github.com/tozny/e3db-java/pull/20#discussion_r196978481","pull_request_url":"https://api.github.com/repos/tozny/e3db-java/pulls/20","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/comments/196978481"},"html":{"href":"https://github.com/tozny/e3db-java/pull/20#discussion_r196978481"},"pull_request":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/20"}},"in_reply_to_id":196972597},"pull_request":{"url":"https://api.github.com/repos/tozny/e3db-java/pulls/20","id":195913366,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTEzMzY2","html_url":"https://github.com/tozny/e3db-java/pull/20","diff_url":"https://github.com/tozny/e3db-java/pull/20.diff","patch_url":"https://github.com/tozny/e3db-java/pull/20.patch","issue_url":"https://api.github.com/repos/tozny/e3db-java/issues/20","number":20,"state":"open","locked":false,"title":"Implement Large File Write; Use LazySodium.","user":{"login":"m4dc4p","id":18689,"node_id":"MDQ6VXNlcjE4Njg5","avatar_url":"https://avatars2.githubusercontent.com/u/18689?v=4","gravatar_id":"","url":"https://api.github.com/users/m4dc4p","html_url":"https://github.com/m4dc4p","followers_url":"https://api.github.com/users/m4dc4p/followers","following_url":"https://api.github.com/users/m4dc4p/following{/other_user}","gists_url":"https://api.github.com/users/m4dc4p/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dc4p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dc4p/subscriptions","organizations_url":"https://api.github.com/users/m4dc4p/orgs","repos_url":"https://api.github.com/users/m4dc4p/repos","events_url":"https://api.github.com/users/m4dc4p/events{/privacy}","received_events_url":"https://api.github.com/users/m4dc4p/received_events","type":"User","site_admin":false},"body":"* Replaced kalium (plain) & libsodium-jni (android) with lazysodium-java and\r\n  lazysodium-android libraries.\r\n* Implemented large file encryption & upload. Reading large files stubbed but not\r\n  yet implemented.","created_at":"2018-06-19T18:09:42Z","updated_at":"2018-06-21T00:08:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef9d145f0b16eded5263455db4ea6a316257b7ce","assignee":null,"assignees":[],"requested_reviewers":[{"login":"emanb29","id":789922,"node_id":"MDQ6VXNlcjc4OTkyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/789922?v=4","gravatar_id":"","url":"https://api.github.com/users/emanb29","html_url":"https://github.com/emanb29","followers_url":"https://api.github.com/users/emanb29/followers","following_url":"https://api.github.com/users/emanb29/following{/other_user}","gists_url":"https://api.github.com/users/emanb29/gists{/gist_id}","starred_url":"https://api.github.com/users/emanb29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanb29/subscriptions","organizations_url":"https://api.github.com/users/emanb29/orgs","repos_url":"https://api.github.com/users/emanb29/repos","events_url":"https://api.github.com/users/emanb29/events{/privacy}","received_events_url":"https://api.github.com/users/emanb29/received_events","type":"User","site_admin":false},{"login":"lkwdwrd","id":1895738,"node_id":"MDQ6VXNlcjE4OTU3Mzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1895738?v=4","gravatar_id":"","url":"https://api.github.com/users/lkwdwrd","html_url":"https://github.com/lkwdwrd","followers_url":"https://api.github.com/users/lkwdwrd/followers","following_url":"https://api.github.com/users/lkwdwrd/following{/other_user}","gists_url":"https://api.github.com/users/lkwdwrd/gists{/gist_id}","starred_url":"https://api.github.com/users/lkwdwrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkwdwrd/subscriptions","organizations_url":"https://api.github.com/users/lkwdwrd/orgs","repos_url":"https://api.github.com/users/lkwdwrd/repos","events_url":"https://api.github.com/users/lkwdwrd/events{/privacy}","received_events_url":"https://api.github.com/users/lkwdwrd/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tozny/e3db-java/pulls/20/commits","review_comments_url":"https://api.github.com/repos/tozny/e3db-java/pulls/20/comments","review_comment_url":"https://api.github.com/repos/tozny/e3db-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tozny/e3db-java/issues/20/comments","statuses_url":"https://api.github.com/repos/tozny/e3db-java/statuses/ef9990aae5e25a2d1f33dd52c22da80e0cbcdcd3","head":{"label":"tozny:WASH-60","ref":"WASH-60","sha":"ef9990aae5e25a2d1f33dd52c22da80e0cbcdcd3","user":{"login":"tozny","id":4185639,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODU2Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4185639?v=4","gravatar_id":"","url":"https://api.github.com/users/tozny","html_url":"https://github.com/tozny","followers_url":"https://api.github.com/users/tozny/followers","following_url":"https://api.github.com/users/tozny/following{/other_user}","gists_url":"https://api.github.com/users/tozny/gists{/gist_id}","starred_url":"https://api.github.com/users/tozny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tozny/subscriptions","organizations_url":"https://api.github.com/users/tozny/orgs","repos_url":"https://api.github.com/users/tozny/repos","events_url":"https://api.github.com/users/tozny/events{/privacy}","received_events_url":"https://api.github.com/users/tozny/received_events","type":"Organization","site_admin":false},"repo":{"id":99279978,"node_id":"MDEwOlJlcG9zaXRvcnk5OTI3OTk3OA==","name":"e3db-java","full_name":"tozny/e3db-java","owner":{"login":"tozny","id":4185639,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODU2Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4185639?v=4","gravatar_id":"","url":"https://api.github.com/users/tozny","html_url":"https://github.com/tozny","followers_url":"https://api.github.com/users/tozny/followers","following_url":"https://api.github.com/users/tozny/following{/other_user}","gists_url":"https://api.github.com/users/tozny/gists{/gist_id}","starred_url":"https://api.github.com/users/tozny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tozny/subscriptions","organizations_url":"https://api.github.com/users/tozny/orgs","repos_url":"https://api.github.com/users/tozny/repos","events_url":"https://api.github.com/users/tozny/events{/privacy}","received_events_url":"https://api.github.com/users/tozny/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tozny/e3db-java","description":"E3DB SDK for Android and Java","fork":false,"url":"https://api.github.com/repos/tozny/e3db-java","forks_url":"https://api.github.com/repos/tozny/e3db-java/forks","keys_url":"https://api.github.com/repos/tozny/e3db-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tozny/e3db-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tozny/e3db-java/teams","hooks_url":"https://api.github.com/repos/tozny/e3db-java/hooks","issue_events_url":"https://api.github.com/repos/tozny/e3db-java/issues/events{/number}","events_url":"https://api.github.com/repos/tozny/e3db-java/events","assignees_url":"https://api.github.com/repos/tozny/e3db-java/assignees{/user}","branches_url":"https://api.github.com/repos/tozny/e3db-java/branches{/branch}","tags_url":"https://api.github.com/repos/tozny/e3db-java/tags","blobs_url":"https://api.github.com/repos/tozny/e3db-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tozny/e3db-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tozny/e3db-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/tozny/e3db-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tozny/e3db-java/statuses/{sha}","languages_url":"https://api.github.com/repos/tozny/e3db-java/languages","stargazers_url":"https://api.github.com/repos/tozny/e3db-java/stargazers","contributors_url":"https://api.github.com/repos/tozny/e3db-java/contributors","subscribers_url":"https://api.github.com/repos/tozny/e3db-java/subscribers","subscription_url":"https://api.github.com/repos/tozny/e3db-java/subscription","commits_url":"https://api.github.com/repos/tozny/e3db-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/tozny/e3db-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/tozny/e3db-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/tozny/e3db-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/tozny/e3db-java/contents/{+path}","compare_url":"https://api.github.com/repos/tozny/e3db-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tozny/e3db-java/merges","archive_url":"https://api.github.com/repos/tozny/e3db-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tozny/e3db-java/downloads","issues_url":"https://api.github.com/repos/tozny/e3db-java/issues{/number}","pulls_url":"https://api.github.com/repos/tozny/e3db-java/pulls{/number}","milestones_url":"https://api.github.com/repos/tozny/e3db-java/milestones{/number}","notifications_url":"https://api.github.com/repos/tozny/e3db-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tozny/e3db-java/labels{/name}","releases_url":"https://api.github.com/repos/tozny/e3db-java/releases{/id}","deployments_url":"https://api.github.com/repos/tozny/e3db-java/deployments","created_at":"2017-08-03T22:27:18Z","updated_at":"2018-06-20T16:50:55Z","pushed_at":"2018-06-20T16:50:53Z","git_url":"git://github.com/tozny/e3db-java.git","ssh_url":"git@github.com:tozny/e3db-java.git","clone_url":"https://github.com/tozny/e3db-java.git","svn_url":"https://github.com/tozny/e3db-java","homepage":"","size":13442,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"tozny:master","ref":"master","sha":"9c0127203a4fa8ce10d8ba2faeb4ecce523af71b","user":{"login":"tozny","id":4185639,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODU2Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4185639?v=4","gravatar_id":"","url":"https://api.github.com/users/tozny","html_url":"https://github.com/tozny","followers_url":"https://api.github.com/users/tozny/followers","following_url":"https://api.github.com/users/tozny/following{/other_user}","gists_url":"https://api.github.com/users/tozny/gists{/gist_id}","starred_url":"https://api.github.com/users/tozny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tozny/subscriptions","organizations_url":"https://api.github.com/users/tozny/orgs","repos_url":"https://api.github.com/users/tozny/repos","events_url":"https://api.github.com/users/tozny/events{/privacy}","received_events_url":"https://api.github.com/users/tozny/received_events","type":"Organization","site_admin":false},"repo":{"id":99279978,"node_id":"MDEwOlJlcG9zaXRvcnk5OTI3OTk3OA==","name":"e3db-java","full_name":"tozny/e3db-java","owner":{"login":"tozny","id":4185639,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODU2Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/4185639?v=4","gravatar_id":"","url":"https://api.github.com/users/tozny","html_url":"https://github.com/tozny","followers_url":"https://api.github.com/users/tozny/followers","following_url":"https://api.github.com/users/tozny/following{/other_user}","gists_url":"https://api.github.com/users/tozny/gists{/gist_id}","starred_url":"https://api.github.com/users/tozny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tozny/subscriptions","organizations_url":"https://api.github.com/users/tozny/orgs","repos_url":"https://api.github.com/users/tozny/repos","events_url":"https://api.github.com/users/tozny/events{/privacy}","received_events_url":"https://api.github.com/users/tozny/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tozny/e3db-java","description":"E3DB SDK for Android and Java","fork":false,"url":"https://api.github.com/repos/tozny/e3db-java","forks_url":"https://api.github.com/repos/tozny/e3db-java/forks","keys_url":"https://api.github.com/repos/tozny/e3db-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tozny/e3db-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tozny/e3db-java/teams","hooks_url":"https://api.github.com/repos/tozny/e3db-java/hooks","issue_events_url":"https://api.github.com/repos/tozny/e3db-java/issues/events{/number}","events_url":"https://api.github.com/repos/tozny/e3db-java/events","assignees_url":"https://api.github.com/repos/tozny/e3db-java/assignees{/user}","branches_url":"https://api.github.com/repos/tozny/e3db-java/branches{/branch}","tags_url":"https://api.github.com/repos/tozny/e3db-java/tags","blobs_url":"https://api.github.com/repos/tozny/e3db-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tozny/e3db-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tozny/e3db-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/tozny/e3db-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tozny/e3db-java/statuses/{sha}","languages_url":"https://api.github.com/repos/tozny/e3db-java/languages","stargazers_url":"https://api.github.com/repos/tozny/e3db-java/stargazers","contributors_url":"https://api.github.com/repos/tozny/e3db-java/contributors","subscribers_url":"https://api.github.com/repos/tozny/e3db-java/subscribers","subscription_url":"https://api.github.com/repos/tozny/e3db-java/subscription","commits_url":"https://api.github.com/repos/tozny/e3db-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/tozny/e3db-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/tozny/e3db-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/tozny/e3db-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/tozny/e3db-java/contents/{+path}","compare_url":"https://api.github.com/repos/tozny/e3db-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tozny/e3db-java/merges","archive_url":"https://api.github.com/repos/tozny/e3db-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tozny/e3db-java/downloads","issues_url":"https://api.github.com/repos/tozny/e3db-java/issues{/number}","pulls_url":"https://api.github.com/repos/tozny/e3db-java/pulls{/number}","milestones_url":"https://api.github.com/repos/tozny/e3db-java/milestones{/number}","notifications_url":"https://api.github.com/repos/tozny/e3db-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tozny/e3db-java/labels{/name}","releases_url":"https://api.github.com/repos/tozny/e3db-java/releases{/id}","deployments_url":"https://api.github.com/repos/tozny/e3db-java/deployments","created_at":"2017-08-03T22:27:18Z","updated_at":"2018-06-20T16:50:55Z","pushed_at":"2018-06-20T16:50:53Z","git_url":"git://github.com/tozny/e3db-java.git","ssh_url":"git@github.com:tozny/e3db-java.git","clone_url":"https://github.com/tozny/e3db-java.git","svn_url":"https://github.com/tozny/e3db-java","homepage":"","size":13442,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/20"},"html":{"href":"https://github.com/tozny/e3db-java/pull/20"},"issue":{"href":"https://api.github.com/repos/tozny/e3db-java/issues/20"},"comments":{"href":"https://api.github.com/repos/tozny/e3db-java/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tozny/e3db-java/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/tozny/e3db-java/statuses/ef9990aae5e25a2d1f33dd52c22da80e0cbcdcd3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"m4dc4p"}}