Windows.Security.Cryptography and Windows Phone 8 SDK?

限于喜欢 提交于 2019-12-18 19:43:31

问题


today i installed the new windows phone 8 sdk (w8phone sdk)... tried to include some of my base classes from windows 8 apps... same core they say... but whoops?

no Windows.Security.Cryptography?

I used the SymmetricKeyAlgorithmProvider for end-to-end encryption of serialized data with WCF Services. (http://msdn.microsoft.com/en-us/library/windows/apps/xaml/br241537.aspx)

Seems using .NET Framework Encryption is quite proprietary to the platforms/devices.

Anyone some advises for same functionality on Windows 8 Phone?

Thanks.

EDIT/UPDATE

I solved the problem by porting http://www.bouncycastle.org/ to separate Windows 8 and Windows Phone 8 Libs and a slight changed version of the little BC Engine from here: Encrypt/Decrypt using Bouncy Castle in C#


回答1:


Windows.Security.Cryptography is a WinRT API. Windows Phone 8 still being mostly Silverlight uses the APIs from System.Security.Cryptography, which does not include the SymmetricKeyAlgorithmProvider.

You can still use the AesManaged API on Windows Phone, which may, or may not, be enough for your purpose.

Windows.Security.Cryptography is most likely just the x86 COM abstraction of the Microsoft cryptolib, which is the same as most of System.Security.Cryptography on .NET 3.5-4.0



来源:https://stackoverflow.com/questions/13199028/windows-security-cryptography-and-windows-phone-8-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!