SM2Java icon indicating copy to clipboard operation
SM2Java copied to clipboard

如何获取.pem文件

Open mumuup opened this issue 6 years ago • 2 comments

mumuup avatar Dec 07 '18 04:12 mumuup

先生成,然后export

PopezLotado avatar Dec 08 '18 13:12 PopezLotado

SM2 sm02 = new SM2(); SM2KeyPair keyPair = sm02.generateKeyPair(); ECPoint publicKey2=keyPair.getPublicKey(); BigInteger privateKey2=keyPair.getPrivateKey(); sm02.exportPublicKey(publicKey2, "E:/publickey.pem"); sm02.exportPrivateKey(privateKey2, "E:/privatekey.pem"); ECPoint publicKey3 = sm02.importPublicKey("E:/publickey.pem"); BigInteger privateKey3 = sm02.importPrivateKey("E:/privatekey.pem");

javaxiaoz avatar Mar 14 '19 03:03 javaxiaoz