通用 Windows 应用程序系统.安全.密码学 [英] Universal Windows Application & System.Security.Cryptography

查看:34
本文介绍了通用 Windows 应用程序系统.安全.密码学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为 Windows 10 开发应用程序,但遇到了一个问题.

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

我在 UI 中使用 JS 和 HTML,并希望将 C# 用于代码隐藏.从这个平台的有限文档来看,我的理解是我必须使用一个 Windows 运行时组件,然后 JS 项目将引用它,以便我可以从中调用托管代码.然后,我还需要创建一个运行时组件将引用的通用类库.

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.

我遇到的问题是我使用的代码在某种程度上严重依赖于广泛使用 System.Security.Cryptography 的库以及我收集的 UWP 和 .NET Core 或任何只有 Windows.Security.Cryptography 的库.Core 是一个极其充实的版本,包含在 .NET Framework 中.

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.

我的问题是,是否有可能在我的应用程序中以某种方式包含调用和使用 System.Security.Cryptography?或者我是否必须找到某种解决方法才能使其适用于 UWP?

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?

推荐答案

我的问题是,是否有可能以某种方式包括调用和使用我的应用程序中的 System.Security.Cryptography?或者我必须找到一些一种解决方法,使其适用于 UWP?

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?

不,您不能在通用 Windows 平台应用中使用 System.Security.Cryptography.它包含在完整的 .NET(桌面 .NET)中,而 UWP 的 .NET 没有它.Windows.Security.Cryptography.Core 由 Windows 运行时提供,您可以在 Windows 运行时组件中使用它.恐怕您必须更改使用 System.Security.Cryptography 的代码.

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.

这篇关于通用 Windows 应用程序系统.安全.密码学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆