可移植类库是否支持System.Security.Cryptography命名空间 [英] Is System.Security.Cryptography namespace supported by the Portable Class Library
问题描述
我正在将现有的多目标Silverlight/.NET项目转换为可移植类库项目,以减少支持多个Microsoft平台所需的项目数量.
I am converting an existing multi-target Silverlight/.NET project to a Portable Class Library project in order to reduce the number of projects that are required to support multiple Microsoft platforms.
在使用System.Security.Cryptography命名空间的一个类中出现错误
I have an error in one class that is using the System.Security.Cryptography namespace
名称空间"System.Security"中不存在类型或名称空间名称密码学"(您是否缺少程序集引用?)
The type or namespace name 'Cryptography' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)
该名称空间在Silverlight中可用,我想知道为什么可移植类库不支持它吗?
This namespace is available in Silverlight and I am wondering why the Portable Class Library does not support it?
一个原因可能是这种行为是设计使然:客户端API中不应存在任何与密码相关的代码.
One reason could be that this behaviour is by design: any cryptography related code should not be present in a client side API.
推荐答案
不幸的是,可移植库不支持加密.但是,我们在 PclContrib 中添加了对此的支持.
No unfortunately, Portable Library does not support Crypto. However, we've added support for it in PclContrib.
这篇关于可移植类库是否支持System.Security.Cryptography命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!