2

I currently am developing an app for Windows 10 and have come across a problem.

I am using JS and HTML for the UI and was hoping on using C# for code behind. From the limited documentation of this platform, my understanding is that I must use a Windows Runtime Component which then will get referenced by the JS project so that I can call the managed code from it. I then also need to create a Universal Class Library that the Runtime Component will reference.

The problem that I am having is that the code I am using relies somewhat heavily on a library that uses System.Security.Cryptography extensively and from what I gather the UWP and .NET Core or whatever only has Windows.Security.Cryptography.Core which is an extremely fleshed out version that is included in the .NET Framework.

My question is, is it possible at all to somehow include call and use System.Security.Cryptography in my app? Or will I have to find some kind of workaround such that it will work for UWP?

1
  • PCLCrypto seems to be what you need.
    – Lex Li
    Aug 20, 2015 at 12:28

3 Answers 3

3

My question is, is it possible at all to somehow include call and use System.Security.Cryptography in my app? Or will I have to find some kind of workaround such that it will work for UWP?

No, you can’t use the System.Security.Cryptography in the Universal Windows Platform App. It is included in the full .NET (desktop .NET), and the .NET for UWP does not have it. Windows.Security.Cryptography.Core is provided by the Windows Runtime and you can use it in the Windows Runtime component. I’m afraid you have to change the code where used the System.Security.Cryptography.

1

You can download System.Security.Cryptography.Algorithms nuget package to your solution.

0

The situation has changed! I have a Universal Windows class library on Build 14393 that lets me use System.Security.Cryptography.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.