AES Encryption Envelope for Xamarin platforms (and other platforms supported via PCL)

Some platforms are supported only via PCL. Ungortunately some platform-level API’s are not available there. Still there is a way to use platform API’s and RO SDK or Data Abstract together.

This code snippet contains a full implementation of AES encryption envelope for Xamarin platform.

Use scenario:
Main Xamarin app (iOS or Android one, I tested on both). It references
1.1. Data Access class library
1.2. Data Abstract for PCL build (or RemObjects SDK for PCL build of no Data Abstract features are needed) assemblies

In [1] that has both full access to the Xamarin platform framework implement AES encryption/decryption envelope. So when the data access is performed instantiate the AesEncryptionEnvelope, provide it to the DataModule class defined in the data access PCL library, attach it there to the Message instance and finally access the data.

CustomAesEncryptionEnvelope.cs (5.7 KB)

1 Like

Hi Anton,

sorry, but could you eplain this steps more detailed ?

I have a Xamarin.Forms PCL Project targeting iOS, Android and UWP.
I put all RO/DA stuff in a seperate PCL Project (there is no System.Security.Cryptography namespace).


The original idea was that one implements the code above in a platform-specific class library and then somehow passes an already instantiated envelope instance to the data accesssing PCL code.

Also Xamarin says that it is possible to use .NET Standart 1.3 or higher instead of ‘just PCL’: . The System.Security.Cryptography namespace will be available in this case

Okay, I understand.
Do you plan to support .NET Standard too ?

Yes, we do. Still no concrete ETA for this