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

optimize generate sm2 keypair #1

Closed
Gsealy opened this issue May 24, 2019 · 1 comment
Closed

optimize generate sm2 keypair #1

Gsealy opened this issue May 24, 2019 · 1 comment

Comments

@Gsealy
Copy link

Gsealy commented May 24, 2019

ECNamedCurveParameterSpec sm2Spec = new ECNamedCurveParameterSpec(

you can use blow code:

final ECGenParameterSpec ecGenSpec = new ECGenParameterSpec("sm2p256v1");
final KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC","BC");
kpg.initialize(ecGenSpec);
final KeyPair kp = kpg.generateKeyPair();

BR,
Gsealy

@Trisia
Copy link
Owner

Trisia commented Jun 10, 2019

ECNamedCurveParameterSpec sm2Spec = new ECNamedCurveParameterSpec(

you can use blow code:

final ECGenParameterSpec ecGenSpec = new ECGenParameterSpec("sm2p256v1");
final KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC","BC");
kpg.initialize(ecGenSpec);
final KeyPair kp = kpg.generateKeyPair();

BR,
Gsealy

wow, thank you

@Trisia Trisia closed this as completed Jun 10, 2019
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

2 participants