I am trying to use the ProtectedData class from System.Security.Cryptography to Protect and Unprotect some data. Both calls throw a DllNotFoundException:
System.DllNotFoundException: crypt32.dll
at (wrapper managed-to-native) System.Security.Cryptography.CAPIUnsafe:CryptProtectData (intptr,string,intptr,intptr,intptr,uint,intptr)
at System.Security.Cryptography.CAPI.CryptProtectData (IntPtr pDataIn, System.String szDataDescr, IntPtr pOptionalEntropy, IntPtr pvReserved, IntPtr pPromptStruct, UInt32 dwFlags, IntPtr pDataBlob) [0x0000d] in :0
at System.Security.Cryptography.ProtectedData.Protect (System.Byte[] userData, System.Byte[] optionalEntropy, DataProtectionScope scope) [0x000d1] in :0
at SageIdAuth.Auth.Storage.KeyManager.EncryptAndSave (System.Xml.XmlDocument document, System.String keyFile, System.String entropy) [0x0000f] in \Dev\Xamarin\SageIdAuth\SageIdAuth\SageIdAuth\Auth\Storage\KeyManager.cs:48