Universal Windows Application & System.Security.Cryptography
Asked Answered
E

3

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?

Evanevander answered 20/8, 2015 at 10:18 Comment(1)
PCLCrypto seems to be what you need.Od
S
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.

Selfdenial answered 21/8, 2015 at 7:30 Comment(0)
B
1

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

Bates answered 4/1, 2017 at 18:59 Comment(0)
C
0

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

Crease answered 3/10, 2018 at 11:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.