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

generateKeyPair for RSA PRIVATE KEY or PRIVATE KEY #2

Closed
kitkatbaf opened this issue Mar 16, 2016 · 1 comment
Closed

generateKeyPair for RSA PRIVATE KEY or PRIVATE KEY #2

kitkatbaf opened this issue Mar 16, 2016 · 1 comment

Comments

@kitkatbaf
Copy link

Hi,

Actually, when we generate a key pair, we have a privatekey encoding with PKCS#8 crypted by a password, "-----BEGIN ENCRYPTED PRIVATE KEY----- [...] -----END ENCRYPTED PRIVATE KEY----- ".
var keyPair = VirgilCrypto.generateKeyPair(keyPBKDF2,VirgilCrypto.KeysTypesEnum.RSA_2048);

is it possible to convert him to have a header of the form "-----BEGIN PRIVATE KEY----- [...] or "-----BEGIN RSA PRIVATE KEY----- [...] ?

Thank you and sorry for my english.
Regards

@kitkatbaf kitkatbaf reopened this Mar 16, 2016
@SergeySeroshtan
Copy link
Member

Hi.

To produce plain private key with header "-----BEGIN RSA PRIVATE KEY----- [...] -----END RSA PRIVATE KEY----- ", just pass empty password.

Best regards.

@ddain ddain closed this as completed Apr 9, 2016
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