commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-crypto git commit: lvar should not hide ivar.
Date Thu, 30 Jun 2016 23:31:23 GMT
Repository: commons-crypto
Updated Branches:
  refs/heads/master 881d2b9a3 -> f7ccb8126


lvar should not hide ivar.

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/f7ccb812
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/f7ccb812
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/f7ccb812

Branch: refs/heads/master
Commit: f7ccb8126f6ada2823c0e953b135e0a9fe52edbe
Parents: 881d2b9
Author: Gary Gregory <ggregory@apache.org>
Authored: Thu Jun 30 16:31:21 2016 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Thu Jun 30 16:31:21 2016 -0700

----------------------------------------------------------------------
 .../crypto/stream/PositionedCryptoInputStream.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f7ccb812/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
index 0ccdc20..150824b 100644
--- a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
@@ -238,14 +238,14 @@ public class PositionedCryptoInputStream extends CtrCryptoInputStream
{
             ByteBuffer outByteBuffer) throws IOException {
         int inputSize = inByteBuffer.remaining();
         try {
-            int n = state.getCipher().update(inByteBuffer, outByteBuffer);
+            int n = state.getCryptoCipher().update(inByteBuffer, outByteBuffer);
             if (n < inputSize) {
                 /**
                  * Typically code will not get here. CryptoCipher#update will
                  * consume all input data and put result in outBuffer.
                  * CryptoCipher#doFinal will reset the cipher context.
                  */
-                state.getCipher().doFinal(inByteBuffer, outByteBuffer);
+                state.getCryptoCipher().doFinal(inByteBuffer, outByteBuffer);
                 state.reset(true);
             }
         } catch (ShortBufferException e) {
@@ -298,7 +298,7 @@ public class PositionedCryptoInputStream extends CtrCryptoInputStream
{
         final long counter = getCounter(position);
         CtrCryptoInputStream.calculateIV(getInitIV(), counter, iv);
         try {
-            state.getCipher().init(Cipher.DECRYPT_MODE, key,
+            state.getCryptoCipher().init(Cipher.DECRYPT_MODE, key,
                     new IvParameterSpec(iv));
         } catch (InvalidKeyException e) {
             throw new IOException(e);
@@ -391,7 +391,7 @@ public class PositionedCryptoInputStream extends CtrCryptoInputStream
{
     }
 
     private class CipherState {
-        private CryptoCipher cipher;
+        private CryptoCipher cryptoCipher;
         private boolean reset;
 
         /**
@@ -400,7 +400,7 @@ public class PositionedCryptoInputStream extends CtrCryptoInputStream
{
          * @param cipher the CryptoCipher instance.
          */
         public CipherState(CryptoCipher cipher) {
-            this.cipher = cipher;
+            this.cryptoCipher = cipher;
             this.reset = false;
         }
 
@@ -409,8 +409,8 @@ public class PositionedCryptoInputStream extends CtrCryptoInputStream
{
          *
          * @return the cipher.
          */
-        public CryptoCipher getCipher() {
-            return cipher;
+        public CryptoCipher getCryptoCipher() {
+            return cryptoCipher;
         }
 
         /**


Mime
View raw message