Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

ProtectedData.Protect throws DllNotFound(crypt32.dll) exception

$
0
0

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 D:\Dev\Xamarin\SageIdAuth\SageIdAuth\SageIdAuth\Auth\Storage\KeyManager.cs:48


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>