diff --git a/src/test/java/org/bdware/server/ByteTest.java b/src/test/java/org/bdware/server/ByteTest.java new file mode 100644 index 0000000..e516a3d --- /dev/null +++ b/src/test/java/org/bdware/server/ByteTest.java @@ -0,0 +1,17 @@ +package org.bdware.server; + +import org.bdware.sc.conn.ByteUtil; +import org.bouncycastle.pqc.math.linearalgebra.ByteUtils; +import org.junit.Test; + +import java.net.URLEncoder; + +public class ByteTest { + @Test + public void run() { + String hexStr = "af28b0815f865cc04cd9828a9eff0d394da08fed"; + hexStr = "badf98195fb23838651ad581885489c3d750db6c"; + String b64 = ByteUtil.encodeBASE64(ByteUtils.fromHexString(hexStr)); + System.out.println(URLEncoder.encode(b64)); + } +}