Skip to content

How to export keypair? #1688

Answered by larabr
stokito asked this question in Q&A
Oct 1, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

If you have a Key object (from e.g. openpgp.readKey), you can simply call key.armor() and save that to a [text] file.
If it's a decrypted private key, and you want to encrypt it first, you can call openpgp.encryptKey.
If you're generating a key with openpgp.generateKey, you'll get an armored key pair by default (also encrypted, if you give a `passphrase), which you can again easily save to a file.

Does that work for you? Feel free to share more details if you have specific requirements for this backup.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stokito
Comment options

Answer selected by stokito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants