Closed danfuzz closed 12 years ago
I went ahead and wrote a new module that incorporates this as well as the other issues I raised. See (https://github.com/Obvious/ursa) for details. I think I cover all the functionality from node-rsa, and I tried to rationalize the design a bit, so you might want to consider using it yourself.
In any case, thanks for taking my earlier patch.
Cheers!
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.