Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8BC1C200C1C for ; Wed, 15 Feb 2017 23:01:36 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8A51E160B5E; Wed, 15 Feb 2017 22:01:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B0B16160B4D for ; Wed, 15 Feb 2017 23:01:35 +0100 (CET) Received: (qmail 74217 invoked by uid 500); 15 Feb 2017 22:01:34 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 74208 invoked by uid 99); 15 Feb 2017 22:01:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 22:01:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AFAB9DFAB2; Wed, 15 Feb 2017 22:01:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebb@apache.org To: commits@commons.apache.org Message-Id: <08f9eb530a2d463b8e54a58c4a11d5a2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: commons-crypto git commit: CRYPTO-129 Revert unnecessary exposure of instance variables Date: Wed, 15 Feb 2017 22:01:34 +0000 (UTC) archived-at: Wed, 15 Feb 2017 22:01:36 -0000 Repository: commons-crypto Updated Branches: refs/heads/master 9f73f2fc1 -> c24b691ac CRYPTO-129 Revert unnecessary exposure of instance variables Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/c24b691a Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/c24b691a Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/c24b691a Branch: refs/heads/master Commit: c24b691ac4efadb8fa4c6beac63d58cb4a9faa6e Parents: 9f73f2f Author: Sebb Authored: Wed Feb 15 22:01:16 2017 +0000 Committer: Sebb Committed: Wed Feb 15 22:01:16 2017 +0000 ---------------------------------------------------------------------- .../apache/commons/crypto/stream/CryptoInputStream.java | 10 +++++----- .../apache/commons/crypto/stream/CryptoOutputStream.java | 10 +++++----- .../apache/commons/crypto/cipher/AbstractCipherTest.java | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/c24b691a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java index 5c2bb14..a7f7622 100644 --- a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java +++ b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java @@ -58,13 +58,13 @@ public class CryptoInputStream extends InputStream implements + "stream.buffer.size"; /** The CryptoCipher instance. */ - protected final CryptoCipher cipher; + final CryptoCipher cipher; // package protected for access by crypto classes; do not expose futher /** The buffer size. */ private final int bufferSize; /** Crypto key for the cipher. */ - protected final Key key; + final Key key; // package protected for access by crypto classes; do not expose futher /** the algorithm parameters */ private final AlgorithmParameterSpec params; @@ -78,19 +78,19 @@ public class CryptoInputStream extends InputStream implements private boolean finalDone = false; /** The input data. */ - protected Input input; + Input input; // package protected for access by crypto classes; do not expose futher /** * Input data buffer. The data starts at inBuffer.position() and ends at to * inBuffer.limit(). */ - protected ByteBuffer inBuffer; + ByteBuffer inBuffer; // package protected for access by crypto classes; do not expose futher /** * The decrypted data buffer. The data starts at outBuffer.position() and * ends at outBuffer.limit(). */ - protected ByteBuffer outBuffer; + ByteBuffer outBuffer; // package protected for access by crypto classes; do not expose futher // stream related configuration keys /** http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/c24b691a/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java b/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java index 7e86809..4246713 100644 --- a/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java +++ b/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java @@ -50,16 +50,16 @@ public class CryptoOutputStream extends OutputStream implements private final byte[] oneByteBuf = new byte[1]; /** The output. */ - protected Output output; + Output output; // package protected for access by crypto classes; do not expose futher /** the CryptoCipher instance */ - protected final CryptoCipher cipher; + final CryptoCipher cipher; // package protected for access by crypto classes; do not expose futher /** The buffer size. */ private final int bufferSize; /** Crypto key for the cipher. */ - protected final Key key; + final Key key; // package protected for access by crypto classes; do not expose futher /** the algorithm parameters */ private final AlgorithmParameterSpec params; @@ -71,13 +71,13 @@ public class CryptoOutputStream extends OutputStream implements * Input data buffer. The data starts at inBuffer.position() and ends at * inBuffer.limit(). */ - protected ByteBuffer inBuffer; + ByteBuffer inBuffer; // package protected for access by crypto classes; do not expose futher /** * Encrypted data buffer. The data starts at outBuffer.position() and ends * at outBuffer.limit(). */ - protected ByteBuffer outBuffer; + ByteBuffer outBuffer; // package protected for access by crypto classes; do not expose futher /** * Constructs a {@link CryptoOutputStream}. http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/c24b691a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java index 785fd15..2e6d0be 100644 --- a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java +++ b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java @@ -51,9 +51,9 @@ public abstract class AbstractCipherTest { protected String[] transformations = null; // cipher - protected static final byte[] KEY = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + static final byte[] KEY = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }; - protected static final byte[] IV = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + static final byte[] IV = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; private CryptoCipher enc, dec;