Missing System.Security.Cryptography

Nagriar picture Nagriar · Aug 11, 2014 · Viewed 10.2k times · Source

I want to use the HMACSHA1 class in a project but the namespace System.Security.Cryptography is missing. If I add the reference System.Security, I find the namespace Cryptography but without the class HMACSHA1. And I can't find the namespace Windows.Security.Cryptography which seems to replace System.Security.Cryptography.

My projet targets the framework .NET 4.5and the .NET for Windows Store apps and He use Nuget on Visual 2012 on Windows 7.

Someone have a solution to this problem ?

Answer

user57508 picture user57508 · Aug 12, 2014

According to the MSDN entry on HMACSHA1

http://msdn.microsoft.com/en-us/library/system.security.cryptography.hmacsha1(v=vs.110).aspx

There's no information that it is included in the Portable Class Library.

BUT: there's Portable Class Libraries Contrib out there, which includes a port of HMACSHA1