You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/changes/changes.xml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,9 @@ The <action> type attribute can be add,update,fix,remove.
46
46
<releaseversion="1.22.1"date="YYYY-MM-DD"description="This is a feature and maintenance release. Java 8 or later is required.">
47
47
<!-- FIX -->
48
48
<actiontype="fix"issue="CODEC-343"dev="ggregory"due-to="Ruiqi Dong, Gary Gregory">Base32.Builder.setHexDecodeTable(boolean) sets the encode table to a decode lookup table.</action>
49
+
<actiontype="fix"issue="CODEC-341"dev="ggregory"due-to="Ruiqi Dong, Gary Gregory">Base16.Builder.setEncodeTable(byte...) can create a codec that cannot decode its own output.</action>
50
+
<actiontype="fix"issue="CODEC-339"dev="ggregory"due-to="Ruiqi Dong, Gary Gregory">URLCodec.encodeUrl(BitSet, byte[]) allows custom safe sets to emit URL encoding control characters.</action>
51
+
<actiontype="fix"issue="CODEC-338"dev="ggregory"due-to="Ruiqi Dong, Gary Gregory">PercentCodec loses literal '+' when plusForSpace is enabled.</action>
49
52
<actiontype="add"issue="CODEC-337"dev="pkarwasz"due-to="Ruiqi Dong, Gary Gregory">Digest ALL reuses System.in, so only the first algorithm sees the real input (#431).</action>
Copy file name to clipboardExpand all lines: src/main/java/org/apache/commons/codec/binary/Base16.java
+43-8Lines changed: 43 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
* </p>
34
34
* <p>
35
35
* The only additional feature above those specified in RFC 4648 is support for working with a lower-case alphabet in addition to the default upper-case
36
-
* alphabet.
36
+
* alphabet, and configuring a custom 16-byte alphabet with {@link Builder#setEncodeTable(byte...)}.
37
37
* </p>
38
38
*
39
39
* @see Base16InputStream
@@ -78,10 +78,18 @@ public Base16 get() {
78
78
returnnewBase16(this);
79
79
}
80
80
81
+
/**
82
+
* Sets the Base16 encode table and derives the matching decode table.
83
+
*
84
+
* @param encodeTable 16 unique bytes, null resets to the default upper-case table.
85
+
* @return {@code this} instance.
86
+
* @throws IllegalArgumentException if {@code encodeTable} does not contain 16 unique bytes.
0 commit comments