monoxamarin.iosxamarin.androidportable-class-librarysignedxml

System.Security.Cryptography.Xml in portable class library?


I'm using a licensing tool (Rhino.Licensing) that uses signed XML files as licenses.

Since the System.Security.Cryptography.Xml namespace is not available on varios platforms (like MonoTouch and Mono for Android, etc) its not possible to validate a license and its signature.

Is there a way to read and validate signed XML files on the portable class library platform?

I currently need this feature on .NET, Mono, MonoTouch, Mono for Android, WinRT, Silverlight, MonoGame


Solution

  • AFAIK (there's too many profile in PCL 2.0) System.Security.dll is not part of any portable library profile.

    The good news is that you could build your own using Mono's source code. That should be pretty easy for MonoTouch and Mono for Android.

    The only problem I can foresee is Silverlight since it did not (last time I checked) support RSA and Mono's BigInteger implementation requires unsafe code (which was also not allowed under most circumstances). OTOH, and with a bit more work, you could re-implement RSA using SL's System.Numerics.dll.