去掉打印

This commit is contained in:
liulu 2024-12-09 11:11:27 +08:00
parent 9e8b3fa5c8
commit ff59a4fe30

View File

@ -6,7 +6,6 @@ import lombok.NoArgsConstructor;
import org.bouncycastle.util.encoders.Hex;
import org.springframework.util.Assert;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Objects;
@ -56,11 +55,6 @@ public class EccPubKey {
pubKey = Arrays.copyOfRange(pubKey, 1, pubKey.length);
} else if (Objects.equals(pubKey.length, 132)) {
// 00010000
byte[] bytes = Arrays.copyOf(pubKey, 4);
System.out.println(Hex.toHexString(bytes));
int anInt = ByteBuffer.wrap(bytes).getInt();
System.out.println(anInt);
pubKey = Arrays.copyOfRange(pubKey, 4, pubKey.length);
}
Assert.isTrue(Objects.equals(pubKey.length, 64) || Objects.equals(pubKey.length, 128), "Ecc公钥数据格式错误");