Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.multiformats</groupId>
<artifactId>java-multibase</artifactId>
<groupId>io.multiformats</groupId>
<artifactId>multibase</artifactId>
<version>1.3.1-SNAPSHOT</version>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

public class Base16 {
public static byte[] decode(String hex) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

import java.util.Collections;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

import java.math.BigInteger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

/*
* Copyright 2011 Google Inc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Defines common decoding methods for byte array decoders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Defines common encoding methods for byte array encoders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Character encoding names required of every implementation of the Java platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.ipfs.multibase;
package io.multibase;

import java.nio.charset.Charset;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Provides the highest level of abstraction for Decoders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Thrown when there is a failure condition during the decoding process. This exception is thrown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Provides the highest level of abstraction for Encoders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase;
package io.multibase;

/**
* Thrown when there is a failure condition during the encoding process. This exception is thrown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.ipfs.multibase;
package io.multibase;

import io.ipfs.multibase.binary.Base32;
import io.ipfs.multibase.binary.Base64;
import io.multibase.binary.Base32;
import io.multibase.binary.Base64;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase.binary;
package io.multibase.binary;

/**
* Provides Base32 encoding and decoding as defined by <a
Expand Down Expand Up @@ -66,15 +66,129 @@ public class Base32 extends BaseNCodec {
*/
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, -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-O
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 50-5a P-Z
-1, -1, -1, -1, -1, // 5b - 5f
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 60 - 6f a-o
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 70 - 7a p-z/**/
-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,
-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-O
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25, // 50-5a P-Z
-1,
-1,
-1,
-1,
-1, // 5b - 5f
-1,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14, // 60 - 6f a-o
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25, // 70 - 7a p-z/**/
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package io.ipfs.multibase.binary;
package io.multibase.binary;

import java.math.BigInteger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package io.ipfs.multibase.binary;
package io.multibase.binary;

import io.ipfs.multibase.BinaryDecoder;
import io.ipfs.multibase.BinaryEncoder;
import io.ipfs.multibase.DecoderException;
import io.ipfs.multibase.EncoderException;
import io.multibase.BinaryDecoder;
import io.multibase.BinaryEncoder;
import io.multibase.DecoderException;
import io.multibase.EncoderException;

/**
* Abstract superclass for Base-N encoders and decoders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package io.ipfs.multibase.binary;
package io.multibase.binary;

import io.ipfs.multibase.CharEncoding;
import io.ipfs.multibase.Charsets;
import io.multibase.CharEncoding;
import io.multibase.Charsets;
import java.nio.charset.Charset;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module io.ipfs.multibase {
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module-info.java still declares the module name as io.ipfs.multibase even though all exported packages were renamed to io.multibase.*. If the intent is to complete the namespace migration (and avoid exposing an io.ipfs.* JPMS module name to consumers), rename the module to match the new coordinates (e.g., io.multibase or io.multiformats.multibase). If keeping the old module name is intentional for JPMS compatibility, it would be good to document that decision since it’s now inconsistent with the package/export names.

Suggested change
module io.ipfs.multibase {
module io.multibase {

Copilot uses AI. Check for mistakes.
exports io.ipfs.multibase;
exports io.ipfs.multibase.binary;
exports io.multibase;
exports io.multibase.binary;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ipfs.multibase;
package io.multibase;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down
Loading