add byte test

This commit is contained in:
CaiHQ 2022-05-05 13:42:28 +08:00
parent 3000ba5874
commit a553a13a31

View File

@ -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));
}
}