[Solved] Encrypt string using PCLCrypto

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.CreateSymmetricKey(keyMaterial); // The IV may be null, but supplying a random IV increases security. // The IV is not a secret like the … Read more