Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MD5 class not there in System.Security.Cryptography

I'm not seeing the MD5 class in System.Security.Cryptography, although I see SHA256. Clearly I have the namespace available to me. I don't see any notes on MSDN about it's removal for this Silverlight-style implementation of .NET. Was it moved?

like image 466
Kalen Avatar asked Sep 25 '10 07:09

Kalen


2 Answers

No, it's not in Silverlight.

Have a look at the Silverlight contents of the System.Security.Cryptography namespace.

The other clue is that when you look at the MD5 class in MSDN and go for the "Other versions" drop-down (at least in the "light" presentation mode; the exact way of checking varies) Silverlight isn't present (whereas it is for SHA256, for example).

Admittedly it would be nice if the "Supported Versions" information at the bottom of the page included things like Silverlight and Windows Phone 7, but those are some alternative ways.

If you really need MD5 in your Silverlight app, you can have a look at this implementation.

like image 55
Jon Skeet Avatar answered Sep 28 '22 14:09

Jon Skeet


Agreed - not there, but you might try some of the reimplementations, for example Silverlight MD5 implementation on MSDN Code Gallery.

like image 40
Marc Gravell Avatar answered Sep 28 '22 15:09

Marc Gravell