commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject commons-crypto git commit: CRYPTO-129 Revert unnecessary exposure of instance variables
Date Wed, 15 Feb 2017 22:01:34 GMT
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 <sebb@apache.org>
Authored: Wed Feb 15 22:01:16 2017 +0000
Committer: Sebb <sebb@apache.org>
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;
 


Mime
View raw message