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

How to create pubkey and prikey #3

Open
wenchaosong opened this issue Aug 3, 2020 · 2 comments
Open

How to create pubkey and prikey #3

wenchaosong opened this issue Aug 3, 2020 · 2 comments

Comments

@wenchaosong
Copy link

No description provided.

@wenchaosong
Copy link
Author

em...... i create pubkey and prikey,but i can not convert to String

var k = new RSAKeyGenerator();
k.init(rngParams);
var keyPair = k.generateKeyPair();
keyPair.publicKey.
keyPair.privateKey

the value is Object,
how to convert to String?

@itenfay
Copy link
Owner

itenfay commented Aug 12, 2020

Hi,

First, I recommend that you use the terminal to generate the private key and public key.

Second, I think you can try this:

var k = new RSAKeyGenerator();
k.init(rngParams);
var keyPair = k.generateKeyPair();
keyPair.publicKey.toString()
keyPair.privateKey.toString()

Finally, the reference links are attached.

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