You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
public string Encrypt(string stringToEncrypt, string cryptoKey)
{
byte[] keyMaterial = System.Text.Encoding.UTF8.GetBytes (cryptoKey);
byte[] data = System.Text.Encoding.UTF8.GetBytes (stringToEncrypt);
var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7);
var key = provider.CreateSymmetricKey (keyMaterial);
byte[] cipherText = WinRTCrypto.CryptographicEngine.Encrypt(key, data);
return Convert.ToBase64String (cipherText);
}
The line var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7); fails with error System.NotImplementedException: Not implemented in reference assembly
I'm confused as I thought the point of the library was to provide cryptographic support for codebases that use the PCL. Is SymmetricKeyAlgorithmProvider not available to PCL codebases? And if not, what is the way to encrypt/decrypt strings on iOS devices?
The text was updated successfully, but these errors were encountered:
Hi,
I have the following method:
The line var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7); fails with error System.NotImplementedException: Not implemented in reference assembly
I'm confused as I thought the point of the library was to provide cryptographic support for codebases that use the PCL. Is SymmetricKeyAlgorithmProvider not available to PCL codebases? And if not, what is the way to encrypt/decrypt strings on iOS devices?
The text was updated successfully, but these errors were encountered: