pcl-crypto

System.Security.Cryptography vs PCLCrypto

耗尽温柔 提交于 2019-12-08 18:01:05
问题 We are in the process of gutting a lot of shared functionality in our system and porting it to PCL libraries. I am having an issue using PCLCrypto. I am taking some existing data in our database, and trying to decrypt it with the same algorithm. I get the value back, but there are 16 extra bytes at the end that are just garbage. See Code below: Old Algorithm using System.Security.Cryptography public static string SymmetricEncrypt(this string plaintext, string key, SymmetricAlgorithm algorithm

Encrypt string using PCLCrypto

烈酒焚心 提交于 2019-11-29 18:52:43
I have a RSA key which I got from a service provider. I just want to encrypt the string data with that RSA key by using the PCLCrypto library. I don't want to create the RSA key by using PCLCrypto. I only wanted to encrypt the data. (I am developing a PCL component in xamarin.) Follow the documentation for AES encryption and modify it for RSA. Use AsymmetricAlgorithm.RsaPkcs1 as algorithm provider. Below example is for AES. byte[] keyMaterial; byte[] data; var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7); var key = provider

Encrypt string using PCLCrypto

时光毁灭记忆、已成空白 提交于 2019-11-28 13:02:09
问题 I have a RSA key which I got from a service provider. I just want to encrypt the string data with that RSA key by using the PCLCrypto library. I don't want to create the RSA key by using PCLCrypto. I only wanted to encrypt the data. (I am developing a PCL component in xamarin.) 回答1: Follow the documentation for AES encryption and modify it for RSA. Use AsymmetricAlgorithm.RsaPkcs1 as algorithm provider. Below example is for AES. byte[] keyMaterial; byte[] data; var provider = WinRTCrypto