Portable Class Library and AES encryption

Hi there,

We have a RO SDK for .NET webservice with an AesEncryptionEnvelope attached to the BinMessage. Now we are trying to use this webservice in a new Xamarin PCL project, but it appears the envelope object is not present in the RO SDK dll for PCL. Am I looking in the right place? If so, will the encryption envelope be added to the PCL dll in the near future?

Regards

Hello

Unfortunately PCL doesn’t expose API needed to perform AES encryption. We are currently investigating the question of implementing the AESEncryptionEnvelope .

Regards

Hello

Please take a look at this blogpost: http://blogs.remobjects.com/blogs/antonk/2014/07/31/p6917

Indeed I was trying to set up SDK server communication in the PCL. If I understand correctly, the implementation of the AES envelope should be done in the ‘native’ Android or iOS projects. Which SDK dll should then be referenced in those projects? The MonoTouch and MonoDroid dlls are not available anymore in SDK 8.

Hello

It should reference PCL builds. Essentially in the ‘native’ app or a class library you implement the abstract class MessageEnvelope provided by PCL code.

When I created a Proof of Concept apps I used the following scheme:

  1. RemObjects SDK server running on a remote host, that has AES encryption enabled.

  2. 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 not Data Abstract features are needed) assemblies

In [1] that has both full access to the Xamarin platform framework I implemented AES encryption/decryption class. So when the data access was performed I instantiated the AesEncryptionEnvelope, provided it to the DataModule class defined in my data access PCL library, attached it there to the Message instance and finally accessed the data.

Works like a charm. Thanks!

new URL from post 3

The source code is broken there. I’ll restore the code in a few days and will put it to the Snippets section of Talk

1 Like