use of com.github.zhenwei.sdk.builder.KeyBuilder in project LinLong-Java by zhenwei1108.
the class RealSignerTest method readSigner.
@Test
public void readSigner() throws BaseWeGooException {
WeGooProvider weGooProvider = new WeGooProvider();
SignBuilder signBuilder = new SignBuilder(weGooProvider);
KeyBuilder keyBuilder = new KeyBuilder(weGooProvider);
KeyPair keyPair = keyBuilder.buildKeyPair(KeyPairAlgEnum.RSA_1024);
byte[] data = signBuilder.signatureSourceData(SignAlgEnum.SHA256_WITH_RSA, keyPair.getPrivate(), "asdfa".getBytes(StandardCharsets.UTF_8));
System.out.println(Hex.toHexString(data));
}
Aggregations