{"action":"created","comment":{"url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/comments/55483613","id":55483613,"diff_hunk":"@@ -0,0 +1,144 @@\n+/**\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.intel.chimera.bytes;\n+\n+import com.intel.chimera.cipher.Cipher;\n+import com.intel.chimera.cipher.CipherType;\n+\n+import javax.crypto.BadPaddingException;\n+import javax.crypto.IllegalBlockSizeException;\n+import javax.crypto.ShortBufferException;\n+import java.io.IOException;\n+import java.nio.ByteBuffer;\n+\n+/**\n+ * Base class for {@link BytesEncryptor} and {@link BytesDecryptor}\n+ */\n+public abstract class BytesCipherBase {","path":"src/main/java/com/intel/chimera/bytes/BytesCipherBase.java","position":32,"original_position":32,"commit_id":"479171857051fbe249931a7eeca23690c204af1a","original_commit_id":"479171857051fbe249931a7eeca23690c204af1a","user":{"login":"winningsix","id":2278268,"avatar_url":"https://avatars.githubusercontent.com/u/2278268?v=3","gravatar_id":"","url":"https://api.github.com/users/winningsix","html_url":"https://github.com/winningsix","followers_url":"https://api.github.com/users/winningsix/followers","following_url":"https://api.github.com/users/winningsix/following{/other_user}","gists_url":"https://api.github.com/users/winningsix/gists{/gist_id}","starred_url":"https://api.github.com/users/winningsix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winningsix/subscriptions","organizations_url":"https://api.github.com/users/winningsix/orgs","repos_url":"https://api.github.com/users/winningsix/repos","events_url":"https://api.github.com/users/winningsix/events{/privacy}","received_events_url":"https://api.github.com/users/winningsix/received_events","type":"User","site_admin":false},"body":"I find ```javax.crypto.Cipher``` has the API ```update(byte[] input, int inputLen, byte[] output, int outputOffset)```. ","created_at":"2016-03-09T08:11:46Z","updated_at":"2016-03-09T08:11:46Z","html_url":"https://github.com/intel-hadoop/chimera/pull/73#discussion_r55483613","pull_request_url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73","_links":{"self":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/comments/55483613"},"html":{"href":"https://github.com/intel-hadoop/chimera/pull/73#discussion_r55483613"},"pull_request":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73","id":62092187,"html_url":"https://github.com/intel-hadoop/chimera/pull/73","diff_url":"https://github.com/intel-hadoop/chimera/pull/73.diff","patch_url":"https://github.com/intel-hadoop/chimera/pull/73.patch","issue_url":"https://api.github.com/repos/intel-hadoop/chimera/issues/73","number":73,"state":"open","locked":false,"title":"Add api for byte array / byte buffer","user":{"login":"dongche","id":8003874,"avatar_url":"https://avatars.githubusercontent.com/u/8003874?v=3","gravatar_id":"","url":"https://api.github.com/users/dongche","html_url":"https://github.com/dongche","followers_url":"https://api.github.com/users/dongche/followers","following_url":"https://api.github.com/users/dongche/following{/other_user}","gists_url":"https://api.github.com/users/dongche/gists{/gist_id}","starred_url":"https://api.github.com/users/dongche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongche/subscriptions","organizations_url":"https://api.github.com/users/dongche/orgs","repos_url":"https://api.github.com/users/dongche/repos","events_url":"https://api.github.com/users/dongche/events{/privacy}","received_events_url":"https://api.github.com/users/dongche/received_events","type":"User","site_admin":false},"body":"Add API for encrypt / decrypt a byte array or byte buffer. \r\nWrap the bytes with a non direct buffer when JCECipher, and copy the bytes to a direct buffer when OpensslCipher.","created_at":"2016-03-08T16:02:41Z","updated_at":"2016-03-09T08:11:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7294685f4806478cadb40eeea2e7db4f16dfac45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73/commits","review_comments_url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73/comments","review_comment_url":"https://api.github.com/repos/intel-hadoop/chimera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel-hadoop/chimera/issues/73/comments","statuses_url":"https://api.github.com/repos/intel-hadoop/chimera/statuses/479171857051fbe249931a7eeca23690c204af1a","head":{"label":"dongche:bytes-cipher","ref":"bytes-cipher","sha":"479171857051fbe249931a7eeca23690c204af1a","user":{"login":"dongche","id":8003874,"avatar_url":"https://avatars.githubusercontent.com/u/8003874?v=3","gravatar_id":"","url":"https://api.github.com/users/dongche","html_url":"https://github.com/dongche","followers_url":"https://api.github.com/users/dongche/followers","following_url":"https://api.github.com/users/dongche/following{/other_user}","gists_url":"https://api.github.com/users/dongche/gists{/gist_id}","starred_url":"https://api.github.com/users/dongche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongche/subscriptions","organizations_url":"https://api.github.com/users/dongche/orgs","repos_url":"https://api.github.com/users/dongche/repos","events_url":"https://api.github.com/users/dongche/events{/privacy}","received_events_url":"https://api.github.com/users/dongche/received_events","type":"User","site_admin":false},"repo":{"id":47316022,"name":"chimera","full_name":"dongche/chimera","owner":{"login":"dongche","id":8003874,"avatar_url":"https://avatars.githubusercontent.com/u/8003874?v=3","gravatar_id":"","url":"https://api.github.com/users/dongche","html_url":"https://github.com/dongche","followers_url":"https://api.github.com/users/dongche/followers","following_url":"https://api.github.com/users/dongche/following{/other_user}","gists_url":"https://api.github.com/users/dongche/gists{/gist_id}","starred_url":"https://api.github.com/users/dongche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongche/subscriptions","organizations_url":"https://api.github.com/users/dongche/orgs","repos_url":"https://api.github.com/users/dongche/repos","events_url":"https://api.github.com/users/dongche/events{/privacy}","received_events_url":"https://api.github.com/users/dongche/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dongche/chimera","description":"Cryptographic library optimized with AES-NI","fork":true,"url":"https://api.github.com/repos/dongche/chimera","forks_url":"https://api.github.com/repos/dongche/chimera/forks","keys_url":"https://api.github.com/repos/dongche/chimera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dongche/chimera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dongche/chimera/teams","hooks_url":"https://api.github.com/repos/dongche/chimera/hooks","issue_events_url":"https://api.github.com/repos/dongche/chimera/issues/events{/number}","events_url":"https://api.github.com/repos/dongche/chimera/events","assignees_url":"https://api.github.com/repos/dongche/chimera/assignees{/user}","branches_url":"https://api.github.com/repos/dongche/chimera/branches{/branch}","tags_url":"https://api.github.com/repos/dongche/chimera/tags","blobs_url":"https://api.github.com/repos/dongche/chimera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dongche/chimera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dongche/chimera/git/refs{/sha}","trees_url":"https://api.github.com/repos/dongche/chimera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dongche/chimera/statuses/{sha}","languages_url":"https://api.github.com/repos/dongche/chimera/languages","stargazers_url":"https://api.github.com/repos/dongche/chimera/stargazers","contributors_url":"https://api.github.com/repos/dongche/chimera/contributors","subscribers_url":"https://api.github.com/repos/dongche/chimera/subscribers","subscription_url":"https://api.github.com/repos/dongche/chimera/subscription","commits_url":"https://api.github.com/repos/dongche/chimera/commits{/sha}","git_commits_url":"https://api.github.com/repos/dongche/chimera/git/commits{/sha}","comments_url":"https://api.github.com/repos/dongche/chimera/comments{/number}","issue_comment_url":"https://api.github.com/repos/dongche/chimera/issues/comments{/number}","contents_url":"https://api.github.com/repos/dongche/chimera/contents/{+path}","compare_url":"https://api.github.com/repos/dongche/chimera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dongche/chimera/merges","archive_url":"https://api.github.com/repos/dongche/chimera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dongche/chimera/downloads","issues_url":"https://api.github.com/repos/dongche/chimera/issues{/number}","pulls_url":"https://api.github.com/repos/dongche/chimera/pulls{/number}","milestones_url":"https://api.github.com/repos/dongche/chimera/milestones{/number}","notifications_url":"https://api.github.com/repos/dongche/chimera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dongche/chimera/labels{/name}","releases_url":"https://api.github.com/repos/dongche/chimera/releases{/id}","deployments_url":"https://api.github.com/repos/dongche/chimera/deployments","created_at":"2015-12-03T07:37:31Z","updated_at":"2015-12-03T07:37:31Z","pushed_at":"2016-03-09T05:00:57Z","git_url":"git://github.com/dongche/chimera.git","ssh_url":"git@github.com:dongche/chimera.git","clone_url":"https://github.com/dongche/chimera.git","svn_url":"https://github.com/dongche/chimera","homepage":null,"size":359,"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":"master"}},"base":{"label":"intel-hadoop:master","ref":"master","sha":"3380458461086c1ba7847c052a5c5eca7d5eb7e8","user":{"login":"intel-hadoop","id":1839373,"avatar_url":"https://avatars.githubusercontent.com/u/1839373?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-hadoop","html_url":"https://github.com/intel-hadoop","followers_url":"https://api.github.com/users/intel-hadoop/followers","following_url":"https://api.github.com/users/intel-hadoop/following{/other_user}","gists_url":"https://api.github.com/users/intel-hadoop/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-hadoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-hadoop/subscriptions","organizations_url":"https://api.github.com/users/intel-hadoop/orgs","repos_url":"https://api.github.com/users/intel-hadoop/repos","events_url":"https://api.github.com/users/intel-hadoop/events{/privacy}","received_events_url":"https://api.github.com/users/intel-hadoop/received_events","type":"Organization","site_admin":false},"repo":{"id":32968915,"name":"chimera","full_name":"intel-hadoop/chimera","owner":{"login":"intel-hadoop","id":1839373,"avatar_url":"https://avatars.githubusercontent.com/u/1839373?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-hadoop","html_url":"https://github.com/intel-hadoop","followers_url":"https://api.github.com/users/intel-hadoop/followers","following_url":"https://api.github.com/users/intel-hadoop/following{/other_user}","gists_url":"https://api.github.com/users/intel-hadoop/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-hadoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-hadoop/subscriptions","organizations_url":"https://api.github.com/users/intel-hadoop/orgs","repos_url":"https://api.github.com/users/intel-hadoop/repos","events_url":"https://api.github.com/users/intel-hadoop/events{/privacy}","received_events_url":"https://api.github.com/users/intel-hadoop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intel-hadoop/chimera","description":"Cryptographic library optimized with AES-NI","fork":false,"url":"https://api.github.com/repos/intel-hadoop/chimera","forks_url":"https://api.github.com/repos/intel-hadoop/chimera/forks","keys_url":"https://api.github.com/repos/intel-hadoop/chimera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel-hadoop/chimera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel-hadoop/chimera/teams","hooks_url":"https://api.github.com/repos/intel-hadoop/chimera/hooks","issue_events_url":"https://api.github.com/repos/intel-hadoop/chimera/issues/events{/number}","events_url":"https://api.github.com/repos/intel-hadoop/chimera/events","assignees_url":"https://api.github.com/repos/intel-hadoop/chimera/assignees{/user}","branches_url":"https://api.github.com/repos/intel-hadoop/chimera/branches{/branch}","tags_url":"https://api.github.com/repos/intel-hadoop/chimera/tags","blobs_url":"https://api.github.com/repos/intel-hadoop/chimera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel-hadoop/chimera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel-hadoop/chimera/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel-hadoop/chimera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel-hadoop/chimera/statuses/{sha}","languages_url":"https://api.github.com/repos/intel-hadoop/chimera/languages","stargazers_url":"https://api.github.com/repos/intel-hadoop/chimera/stargazers","contributors_url":"https://api.github.com/repos/intel-hadoop/chimera/contributors","subscribers_url":"https://api.github.com/repos/intel-hadoop/chimera/subscribers","subscription_url":"https://api.github.com/repos/intel-hadoop/chimera/subscription","commits_url":"https://api.github.com/repos/intel-hadoop/chimera/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel-hadoop/chimera/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel-hadoop/chimera/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel-hadoop/chimera/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel-hadoop/chimera/contents/{+path}","compare_url":"https://api.github.com/repos/intel-hadoop/chimera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel-hadoop/chimera/merges","archive_url":"https://api.github.com/repos/intel-hadoop/chimera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel-hadoop/chimera/downloads","issues_url":"https://api.github.com/repos/intel-hadoop/chimera/issues{/number}","pulls_url":"https://api.github.com/repos/intel-hadoop/chimera/pulls{/number}","milestones_url":"https://api.github.com/repos/intel-hadoop/chimera/milestones{/number}","notifications_url":"https://api.github.com/repos/intel-hadoop/chimera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel-hadoop/chimera/labels{/name}","releases_url":"https://api.github.com/repos/intel-hadoop/chimera/releases{/id}","deployments_url":"https://api.github.com/repos/intel-hadoop/chimera/deployments","created_at":"2015-03-27T05:12:24Z","updated_at":"2016-02-05T01:16:44Z","pushed_at":"2016-03-09T05:15:28Z","git_url":"git://github.com/intel-hadoop/chimera.git","ssh_url":"git@github.com:intel-hadoop/chimera.git","clone_url":"https://github.com/intel-hadoop/chimera.git","svn_url":"https://github.com/intel-hadoop/chimera","homepage":null,"size":445,"stargazers_count":9,"watchers_count":9,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73"},"html":{"href":"https://github.com/intel-hadoop/chimera/pull/73"},"issue":{"href":"https://api.github.com/repos/intel-hadoop/chimera/issues/73"},"comments":{"href":"https://api.github.com/repos/intel-hadoop/chimera/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel-hadoop/chimera/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/intel-hadoop/chimera/statuses/479171857051fbe249931a7eeca23690c204af1a"}}}}