简体   繁体   English

Windows Phone 8.1通用应用程序的RSA / ECB / PKCS1PADDING加密算法?

[英]RSA/ECB/PKCS1PADDING encryption algorithm for windows phone 8.1 universal app?

What is RSA/ECB/PKCS1PADDING algorithm? 什么是RSA / ECB / PKCS1PADDING算法?
And I need to encrypt a string data using public key by RSA/ECB/PKCS1PADDING in windows phone 8.1 . 我需要通过Windows Phone 8.1中的RSA / ECB / PKCS1PADDING使用公共密钥来加密字符串数据。 How can i do that ? 我怎样才能做到这一点 ? Any help is appreciated. 任何帮助表示赞赏。

Thanks 谢谢

EDIT: 编辑:

After digging and searching on many sources. 经过大量搜索和搜索。 I found the solution from stack over flow itself. 我从堆栈本身找到了解决方案。 For that I used WinRT Ported version of Bouncy Castle. 为此,我使用了Bouncy Castle的WinRT Ported版本。

C# RSA Decryption using Bouncy Castle 使用Bouncy Castle进行C#RSA解密

And I encrypted data successfully. 而且我成功加密了数据。

You need to use the Windows.Security.Cryptography.Core namespace. 您需要使用Windows.Security.Cryptography.Core命名空间。

AsymmetricKeyAlgorithmProvider provider=AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaPkcs1);

You can use this object to implement the algorithm. 您可以使用此对象来实现算法。 The example in below link can help. 以下链接中的示例可以提供帮助。 http://msdn.microsoft.com/en-us/library/windows/apps/windows.security.cryptography.core.asymmetrickeyalgorithmprovider.aspx http://msdn.microsoft.com/zh-CN/library/windows/apps/windows.security.cryptography.core.asymmetrickeyalgorithmprovider.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM