Michel I. Gallant  is a security MVP, he has a nice collectio of crypto related samples showing the differences between CAPICOM, CryptoAPI and System.Security

http://www.jensign.com/JavaScience/cryptoutils/index.html