commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1488493 - in /commons/proper/codec/trunk/src: changes/changes.xml main/java/org/apache/commons/codec/binary/Base32.java
Date Sat, 01 Jun 2013 08:43:58 GMT
Author: sebb
Date: Sat Jun  1 08:43:58 2013
New Revision: 1488493

URL: http://svn.apache.org/r1488493
Log:
CODEC-170 Base32 decode table has spurious value

Modified:
    commons/proper/codec/trunk/src/changes/changes.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32.java

Modified: commons/proper/codec/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/changes/changes.xml?rev=1488493&r1=1488492&r2=1488493&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/changes/changes.xml (original)
+++ commons/proper/codec/trunk/src/changes/changes.xml Sat Jun  1 08:43:58 2013
@@ -43,6 +43,7 @@ The <action> type attribute can be add,u
   </properties>
   <body>
     <release version="1.9" date="TBA" description="Feature and fix release."> 
+      <action dev="sebb" type="fix" issue="CODEC-170" due-to="Matt Bishop">Base32 decode
table has spurious value</action>   
       <action dev="ggregory" type="fix" issue="CODEC-170" due-to="Ron Wheeler, Henri Yandell">Link
broken in Metaphone Javadoc</action>   
     </release>
     <release version="1.8" date="19 April 2013" description="Feature and fix release.
Requires a minimum of Java 1.6">

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32.java?rev=1488493&r1=1488492&r2=1488493&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32.java Sat
Jun  1 08:43:58 2013
@@ -61,14 +61,14 @@ public class Base32 extends BaseNCodec {
 
     /**
      * This array is a lookup table that translates Unicode characters drawn from the "Base32
Alphabet" (as specified
-     * in Table 3 of RFC 2045) into their 5-bit positive integer equivalents. Characters
that are not in the Base32
+     * in Table 3 of RFC 4648) into their 5-bit positive integer equivalents. Characters
that are not in the Base32
      * alphabet but fall within the bounds of the array are translated to -1.
      */
     private static final byte[] DECODE_TABLE = {
          //  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
             -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f
             -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f
-            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, // 20-2f
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f
             -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, // 30-3f 2-7
             -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, // 40-4f A-N
             15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,                     // 50-5a O-Z
@@ -76,7 +76,7 @@ public class Base32 extends BaseNCodec {
 
     /**
      * This array is a lookup table that translates 5-bit positive integer index values into
their "Base32 Alphabet"
-     * equivalents as specified in Table 3 of RFC 2045.
+     * equivalents as specified in Table 3 of RFC 4648.
      */
     private static final byte[] ENCODE_TABLE = {
             'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
@@ -86,14 +86,14 @@ public class Base32 extends BaseNCodec {
 
     /**
      * This array is a lookup table that translates Unicode characters drawn from the "Base32
|Hex Alphabet" (as
-     * specified in Table 3 of RFC 2045) into their 5-bit positive integer equivalents. Characters
that are not in the
+     * specified in Table 3 of RFC 4648) into their 5-bit positive integer equivalents. Characters
that are not in the
      * Base32 Hex alphabet but fall within the bounds of the array are translated to -1.
      */
     private static final byte[] HEX_DECODE_TABLE = {
          //  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
             -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f
             -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f
-            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, // 20-2f
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f
              0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1, // 30-3f 2-7
             -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 40-4f A-N
             25, 26, 27, 28, 29, 30, 31, 32,                                 // 50-57 O-V
@@ -101,7 +101,7 @@ public class Base32 extends BaseNCodec {
 
     /**
      * This array is a lookup table that translates 5-bit positive integer index values into
their
-     * "Base32 Hex Alphabet" equivalents as specified in Table 3 of RFC 2045.
+     * "Base32 Hex Alphabet" equivalents as specified in Table 3 of RFC 4648.
      */
     private static final byte[] HEX_ENCODE_TABLE = {
             '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',



Mime
View raw message