How Do I: Use Encryption in Windows Forms
Pat Tormey show how to use Encryption tools* that wrap the Data Protection API (DPAPI). DPAPI uses either a Machine Level or User Lever internal key freeing the developer from having to manage the keys. Of course the trade off is that the encrypted data is not portable and might not be a good choice for a database application, but that makes it ideal for a Windows Forms project.
*Don’t forget to reference System.Security.
Author: Pat Tormey