joyent/node — pull request #7561 by seishun (2014-05-05 16:07:23+00:00)
Title: crypto: add RSA encryption

Continuing from #7359.

Just public encryption for now, since this is my personal use case that I can test in real life (and it works fine). I would like to receive feedback on this part before I continue.

The API is simple: `crypto.publicEncrypt(key, buf)` returns an encrypted buffer, where `buf` is the buffer to encrypt and `key` is the public key in PEM format.