Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获取.pem文件 #5

Open
mumuup opened this issue Dec 7, 2018 · 2 comments
Open

如何获取.pem文件 #5

mumuup opened this issue Dec 7, 2018 · 2 comments

Comments

@mumuup
Copy link

mumuup commented Dec 7, 2018

No description provided.

@PopezLotado
Copy link
Owner

先生成,然后export

@javaxiaoz
Copy link

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");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants