Even though the new framework makes some tasks much easily, like openning a file in one line, other tasks, like encrypting data still require helper functions.
The classes all exist in the System.Security.Cryptography namespace:
I have choosen to use RSA asymmetric encryption:
Many examples helped over the basic msdn documentation:
One of the annoying things to remember is that on a shared hosting server, you will most likely not have access to the underlying COM object directories. I thought this would be a show stopper, but this only restricts you from decrypting the values, you can still encrypt items fine. So if your requirement is to collect data and store it securely with a public key, then download it remotely and process it with the private key, this should work.
Some issues that may arise: