问题
SHA512Managed
is missing in Silverlight (for Windows Phone 7 CTP SDK), only upto SHA256 is available for use. Does anyone know a .NET class that I could use that offers a self-contained C# or VB.net SHA512 implementation?
I need to use this for authentication to a HTTP web service.
回答1:
Using HashLib from http://hashlib.codeplex.com/ will work fine. There are methods within HashLib.HashFactory.HashCryptoNotBuildIn
that do not require System.Crytography
.
回答2:
Mono has an implementation you could probably use, provided you are happy with the OS license.
https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs
回答3:
Silverlight does not contain the System.Security.Cryptogray namespace. However, you could always port the open source BeeCrypt Cryptography Library (written in C), and use it directly in Silverlight.
http://www.koders.com/info.aspx?c=ProjectInfo&pid=VZ53QH5WTR5UV7LWXYVDKP7P3G
回答4:
As there is no support for SHA512
, we have to use our own or 3rd party implementations.
(Check msdn here..)
Chilkat's implementation worked for me. It is very simple & straight-forward to use. Check it out here..
来源:https://stackoverflow.com/questions/2459533/sha512-within-silverlight-is-not-available-is-there-a-managed-library-available