chrisa/node-rsa — pull request #8 by danfuzz (2012-02-08 00:46:38+00:00)
Title: Add new PEM format getters to RsaKeypair.

Hi there! I did a bit more work on node-rsa and would love it if you'd integrate this change. Thanks in advance for your consideration.

Original commit message below.

-dan

##########

Add new PEM format getters to RsaKeypair.

These methods generate strings in PEM format (text, largely base64
encoded). RsaKeypairs that include a private key can use
getPrivateKeyPem(), and pairs that include either a public or private
key can use getPublicKeyPem() (the latter because private keys have all
the data of a public key within themselves).

Note: getPrivateKeyPem() does not currently do any encryption of the
resulting key file, so it should be used with care.