Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95CAE11698 for ; Sun, 31 Aug 2014 19:29:34 +0000 (UTC) Received: (qmail 82310 invoked by uid 500); 31 Aug 2014 19:29:34 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 82232 invoked by uid 500); 31 Aug 2014 19:29: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 82223 invoked by uid 99); 31 Aug 2014 19:29:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Aug 2014 19:29:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Aug 2014 19:29:29 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 291F52388C1C for ; Sun, 31 Aug 2014 19:28:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r920865 [20/45] - in /websites/production/commons/content/proper/commons-compress: ./ apidocs/ apidocs/org/apache/commons/compress/archivers/ apidocs/org/apache/commons/compress/archivers/ar/ apidocs/org/apache/commons/compress/archivers/ar... Date: Sun, 31 Aug 2014 19:27:54 -0000 To: commits@commons.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140831192820.291F52388C1C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.AES256SHA256Decoder.html ============================================================================== --- websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.AES256SHA256Decoder.html (original) +++ websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.AES256SHA256Decoder.html Sun Aug 31 19:27:46 2014 @@ -82,142 +82,144 @@  32  
     @Override
 33   -
     InputStream decode(final InputStream in, final Coder coder, final byte[] passwordBytes) throws IOException {
-  34  3
         return new InputStream() {
-  35  3
             private boolean isInitialized = false;
-  36  3
             private CipherInputStream cipherInputStream = null;
-  37   -
                 
+
     InputStream decode(final InputStream in, long uncompressedLength,
+  34   +
             final Coder coder, final byte[] passwordBytes) throws IOException {
+  35  3
         return new InputStream() {
+  36  3
             private boolean isInitialized = false;
+  37  3
             private CipherInputStream cipherInputStream = null;
 38   +
                 
+  39  
             private CipherInputStream init() throws IOException {
-  39  467
                 if (isInitialized) {
-  40  464
                     return cipherInputStream;
-  41   +  40  467
                 if (isInitialized) {
+  41  464
                     return cipherInputStream;
+  42  
                 }
-  42  3
                 final int byte0 = 0xff & coder.properties[0];
-  43  3
                 final int numCyclesPower = byte0 & 0x3f;
-  44  3
                 final int byte1 = 0xff & coder.properties[1];
-  45  3
                 final int ivSize = ((byte0 >> 6) & 1) + (byte1 & 0x0f);
-  46  3
                 final int saltSize = ((byte0 >> 7) & 1) + (byte1 >> 4);
-  47  3
                 if (2 + saltSize + ivSize > coder.properties.length) {
-  48  0
                     throw new IOException("Salt size + IV size too long");
-  49   +  43  3
                 final int byte0 = 0xff & coder.properties[0];
+  44  3
                 final int numCyclesPower = byte0 & 0x3f;
+  45  3
                 final int byte1 = 0xff & coder.properties[1];
+  46  3
                 final int ivSize = ((byte0 >> 6) & 1) + (byte1 & 0x0f);
+  47  3
                 final int saltSize = ((byte0 >> 7) & 1) + (byte1 >> 4);
+  48  3
                 if (2 + saltSize + ivSize > coder.properties.length) {
+  49  0
                     throw new IOException("Salt size + IV size too long");
+  50  
                 }
-  50  3
                 final byte[] salt = new byte[saltSize];
-  51  3
                 System.arraycopy(coder.properties, 2, salt, 0, saltSize);
-  52  3
                 final byte[] iv = new byte[16];
-  53  3
                 System.arraycopy(coder.properties, 2 + saltSize, iv, 0, ivSize);
-  54   +  51  3
                 final byte[] salt = new byte[saltSize];
+  52  3
                 System.arraycopy(coder.properties, 2, salt, 0, saltSize);
+  53  3
                 final byte[] iv = new byte[16];
+  54  3
                 System.arraycopy(coder.properties, 2 + saltSize, iv, 0, ivSize);
+  55  
 
-  55  3
                 if (passwordBytes == null) {
-  56  1
                     throw new IOException("Cannot read encrypted files without a password");
-  57   -
                 }
+  56  3
                 if (passwordBytes == null) {
+  57  1
                     throw new IOException("Cannot read encrypted files without a password");
 58   +
                 }
+  59  
                 final byte[] aesKeyBytes;
-  59  2
                 if (numCyclesPower == 0x3f) {
-  60  0
                     aesKeyBytes = new byte[32];
-  61  0
                     System.arraycopy(salt, 0, aesKeyBytes, 0, saltSize);
-  62  0
                     System.arraycopy(passwordBytes, 0, aesKeyBytes, saltSize,
-  63   -
                                      Math.min(passwordBytes.length, aesKeyBytes.length - saltSize));
+  60  2
                 if (numCyclesPower == 0x3f) {
+  61  0
                     aesKeyBytes = new byte[32];
+  62  0
                     System.arraycopy(salt, 0, aesKeyBytes, 0, saltSize);
+  63  0
                     System.arraycopy(passwordBytes, 0, aesKeyBytes, saltSize,
 64   -
                 } else {
+
                                      Math.min(passwordBytes.length, aesKeyBytes.length - saltSize));
 65   -
                     final MessageDigest digest;
+
                 } else {
 66   +
                     final MessageDigest digest;
+  67  
                     try {
-  67  2
                         digest = MessageDigest.getInstance("SHA-256");
-  68  0
                     } catch (NoSuchAlgorithmException noSuchAlgorithmException) {
-  69  0
                         IOException ioe = new IOException("SHA-256 is unsupported by your Java implementation");
-  70  0
                         ioe.initCause(noSuchAlgorithmException);
-  71  0
                         throw ioe;
-  72   -
                         // TODO: simplify when Compress requires Java 1.6                
+  68  2
                         digest = MessageDigest.getInstance("SHA-256");
+  69  0
                     } catch (NoSuchAlgorithmException noSuchAlgorithmException) {
+  70  0
                         IOException ioe = new IOException("SHA-256 is unsupported by your Java implementation");
+  71  0
                         ioe.initCause(noSuchAlgorithmException);
+  72  0
                         throw ioe;
 73   -
 //                      throw new IOException("SHA-256 is unsupported by your Java implementation",
+
                         // TODO: simplify when Compress requires Java 1.6                
 74   +
 //                      throw new IOException("SHA-256 is unsupported by your Java implementation",
+  75  
 //                              noSuchAlgorithmException);
-  75  2
                     }
-  76  2
                     final byte[] extra = new byte[8];
-  77  1048578
                     for (long j = 0; j < (1L << numCyclesPower); j++) {
-  78  1048576
                         digest.update(salt);
-  79  1048576
                         digest.update(passwordBytes);
-  80  1048576
                         digest.update(extra);
-  81  1052688
                         for (int k = 0; k < extra.length; k++) {
-  82  1052688
                             ++extra[k];
-  83  1052688
                             if (extra[k] != 0) {
-  84  1048576
                                 break;
-  85   -
                             }
+  76  2
                     }
+  77  2
                     final byte[] extra = new byte[8];
+  78  1048578
                     for (long j = 0; j < (1L << numCyclesPower); j++) {
+  79  1048576
                         digest.update(salt);
+  80  1048576
                         digest.update(passwordBytes);
+  81  1048576
                         digest.update(extra);
+  82  1052688
                         for (int k = 0; k < extra.length; k++) {
+  83  1052688
                             ++extra[k];
+  84  1052688
                             if (extra[k] != 0) {
+  85  1048576
                                 break;
 86   -
                         }
+
                             }
 87   +
                         }
+  88  
                     }
-  88  2
                     aesKeyBytes = digest.digest();
-  89   -
                 }
+  89  2
                     aesKeyBytes = digest.digest();
 90   +
                 }
+  91  
 
-  91  2
                 final SecretKey aesKey = new SecretKeySpec(aesKeyBytes, "AES");
-  92   +  92  2
                 final SecretKey aesKey = new SecretKeySpec(aesKeyBytes, "AES");
+  93  
                 try {
-  93  2
                     final Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
-  94  2
                     cipher.init(Cipher.DECRYPT_MODE, aesKey, new IvParameterSpec(iv));
-  95  2
                     cipherInputStream = new CipherInputStream(in, cipher);
-  96  2
                     isInitialized = true;
-  97  2
                     return cipherInputStream;
-  98  0
                 } catch (GeneralSecurityException generalSecurityException) {
-  99  0
                     IOException ioe = new IOException("Decryption error " +
-  100   +  94  2
                     final Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
+  95  2
                     cipher.init(Cipher.DECRYPT_MODE, aesKey, new IvParameterSpec(iv));
+  96  2
                     cipherInputStream = new CipherInputStream(in, cipher);
+  97  2
                     isInitialized = true;
+  98  2
                     return cipherInputStream;
+  99  0
                 } catch (GeneralSecurityException generalSecurityException) {
+  100  0
                     IOException ioe = new IOException("Decryption error " +
+  101  
                                                       "(do you have the JCE Unlimited Strength Jurisdiction Policy Files installed?)");
-  101  0
                     ioe.initCause(generalSecurityException);
-  102  0
                     throw ioe;
-  103   -
                     // TODO: simplify when Compress requires Java 1.6                
+  102  0
                     ioe.initCause(generalSecurityException);
+  103  0
                     throw ioe;
 104   -
 //                  throw new IOException("Decryption error " +
+
                     // TODO: simplify when Compress requires Java 1.6                
 105   -
 //                          "(do you have the JCE Unlimited Strength Jurisdiction Policy Files installed?)",
+
 //                  throw new IOException("Decryption error " +
 106   -
 //                          generalSecurityException);
+
 //                          "(do you have the JCE Unlimited Strength Jurisdiction Policy Files installed?)",
 107   -
                     }
+
 //                          generalSecurityException);
 108   -
             }
+
                     }
 109   -
                 
+
             }
 110   -
             @Override
+
                 
 111   +
             @Override
+  112  
             public int read() throws IOException {
-  112  467
                 return init().read();
-  113   -
             }
+  113  467
                 return init().read();
 114   -
                 
+
             }
 115   -
             @Override
+
                 
 116   +
             @Override
+  117  
             public int read(byte[] b, int off, int len) throws IOException {
-  117  0
                 return init().read(b, off, len);
-  118   -
             }
+  118  0
                 return init().read(b, off, len);
 119   -
                 
+
             }
 120   -
             @Override
+
                 
 121   +
             @Override
+  122  
             public void close() {
-  122  1
             }
-  123   -
         };
+  123  1
             }
 124   -
     }
+
         };
 125   +
     }
+  126  
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.Archive.html ============================================================================== --- websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.Archive.html (original) +++ websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.Archive.html Sun Aug 31 19:27:46 2014 @@ -12,7 +12,7 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
Archive
100%
1/1
N/A
0
Archive
25%
1/4
0%
0/4
1.667
 
@@ -93,9 +93,38 @@  38  
     StreamMap streamMap;
 39   +
 
+  40   +
     @Override
+  41   +
     public String toString() {
+  42  0
         return "Archive with packed streams starting at offset " + packPos
+  43   +
             + ", " + lengthOf(packSizes) + " pack sizes, " + lengthOf(packCrcs)
+  44   +
             + " CRCs, " + lengthOf(folders) + " folders, " + lengthOf(files)
+  45   +
             + " files and " + streamMap;
+  46   +
     }
+  47   +
 
+  48   +
     private static String lengthOf(long[] a) {
+  49  0
         return a == null ? "(null)" : String.valueOf(a.length); 
+  50   +
     }
+  51   +
 
+  52   +
     private static String lengthOf(Object[] a) {
+  53  0
         return a == null ? "(null)" : String.valueOf(a.length); 
+  54   +
     }
+  55  
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BindPair.html ============================================================================== --- websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BindPair.html (original) +++ websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BindPair.html Sun Aug 31 19:27:46 2014 @@ -12,7 +12,7 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
BindPair
100%
1/1
N/A
0
BindPair
50%
1/2
N/A
1
 
@@ -61,9 +61,18 @@  22  
     long outIndex;
 23   +
 
+  24   +
     @Override
+  25   +
     public String toString() {
+  26  0
         return "BindPair binding input " + inIndex + " to output " + outIndex;
+  27   +
     }
+  28  
 }
- + \ No newline at end of file Modified: websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BoundedRandomAccessFileInputStream.html ============================================================================== --- websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BoundedRandomAccessFileInputStream.html (original) +++ websites/production/commons/content/proper/commons-compress/cobertura/org.apache.commons.compress.archivers.sevenz.BoundedRandomAccessFileInputStream.html Sun Aug 31 19:27:46 2014 @@ -129,6 +129,6 @@
 }
- + \ No newline at end of file