去掉打印
This commit is contained in:
parent
9e8b3fa5c8
commit
ff59a4fe30
@ -6,7 +6,6 @@ import lombok.NoArgsConstructor;
|
|||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -56,11 +55,6 @@ public class EccPubKey {
|
|||||||
pubKey = Arrays.copyOfRange(pubKey, 1, pubKey.length);
|
pubKey = Arrays.copyOfRange(pubKey, 1, pubKey.length);
|
||||||
} else if (Objects.equals(pubKey.length, 132)) {
|
} else if (Objects.equals(pubKey.length, 132)) {
|
||||||
// 00010000
|
// 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);
|
pubKey = Arrays.copyOfRange(pubKey, 4, pubKey.length);
|
||||||
}
|
}
|
||||||
Assert.isTrue(Objects.equals(pubKey.length, 64) || Objects.equals(pubKey.length, 128), "Ecc公钥数据格式错误");
|
Assert.isTrue(Objects.equals(pubKey.length, 64) || Objects.equals(pubKey.length, 128), "Ecc公钥数据格式错误");
|
||||||
|
Loading…
Reference in New Issue
Block a user