Search code examples
javascriptpgp

Transform gpg_keys received via GitHub Api into armored


How can i get public keys back into their armored look ? like --- BEGIN PU...

I'm working with kbpgp that does not support any other key types, armored only, therefore i'd convert them back and import into kbpgp manager.


Solution

  • GitHub api for gpg_keys does not provide entire public key, it share the packet chunk of the keyid entry. It does not provide another packet bytes like userid, therefore not so much custom gpg implementation can work with it as with general key. Anyways, it useful only for verifiyng keyIds. More..