Zach Burlingame
Zach Burlingame

Reputation: 13806

Why are there multiple different hashing algorithm providers in System.Security.Cryptography?

As documented by MSDN, there are several providers for many of the different hashing algorithms (e.g. MD5, SHA, RIPE). For each of the algorithms, any available implementation seems to fall into 1 of 3 categories:

Why are there multiple implementations of any of these hashing algorithms?

What are the differences between the implementations?

What are the practical differences when choosing which implementation to utilize in an application?

References:

http://msdn.microsoft.com/en-us/library/system.security.cryptography.aspx

Upvotes: 8

Views: 798

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798744

  • [Algo]Managed is a pure-IL implementation of the algorithm.
  • [Algo]CryptoServiceProvider delegates to CAPI, which allows you to use things such as hardware crypto devices.
  • [Algo]Cng uses Cryptography API: Next Generation (CNG) which is designed to be a replacement for CAPI but is only supported in Vista and Server 2008.

Upvotes: 12

Related Questions