Search code examples
.netcsilverlightcryptographyportable-class-library

Is System.Security.Cryptography namespace supported by the Portable Class Library


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.

I have an error in one class that is using the System.Security.Cryptography namespace

The type or namespace name 'Cryptography' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)

This namespace is available in Silverlight and I am wondering why the Portable Class Library does not support it?

One reason could be that this behaviour is by design: any cryptography related code should not be present in a client side API.


Solution

  • No unfortunately, Portable Library does not support Crypto. However, we've added support for it in PclContrib.