Hi All, would like to seek for your help on this issue. 

Now I have multiple list screens and multiple detail screens as well.

 But each list screen has one to three parameters to pass into the related detail screen as input parameters for all the aggregates etc.

Is there any idea or preferred way of doing encryption and decryption using CryptoAPI (mainly using AES256 action) on OS10? Because encrypting each and everyone in all the list screens is somehow inefficient for me as i would need to modify them one-by-one, and also inefficient for me to decrypt them one-by-one manually in the preparation or action in the detail screen. Is there any way of NOT creating additional local variable or adopting session variables to achieve such scenario? 

*p.s a Server Action would be fine and great. But still open for any suggestion.


Regards,

zh

Hi there,

This article of Justin James proposes the use of GUID's which is really helpful.

A second approach would be the use of session variables (for Traditional Web) to pass on data to the next screen, instead of input parameters, as they are stored in the Session Database.

Regards,

Nordin

Nordin Ahdi wrote:

Hi there,

This article of Justin James proposes the use of GUID's which is really helpful.

A second approach would be the use of session variables (for Traditional Web) to pass on data to the next screen, instead of input parameters, as they are stored in the Session Database.

Regards,

Nordin

Hi Nordin,

Apparently GUID is not optimal for our case as we are trying to save storage space and loading/processing time.

While for Session Variable, we have multiple input parameters to pass each screen and we are aware that the size of session variables increase a lot after encryption.


Is there other suggestion perhaps? :)

 

Hi ZH,

In the case of session variables, you would not need input parameters on your screen anymore. You'd replace the input parameters with session variables. Keep in mind the performance best practices to not use large session variables.

These session variables are stored on Database level, so encryption is not necessary as session variables are not visible in HTTP requests.

Regards,

Nordin

Using session variables for passing values between screens is a bad idea. A user can have 5 tabs open in his browser and use them simultaneously.

Why not put all your values in a structure, serialize it to a json string, encrypt that and pass that 1 value as input parameter. On the preparation of the detail screen, decrypt, deserialize and you have all values at once.

In your list screens you could be smart by only encrypting the parameter on the moment you want to go to 1 specific detail screen instead of doing it for all the lines in the preparation.

In my opinion this should be a performant and clean solution to your problem.

Tim Timperman wrote:

Using session variables for passing values between screens is a bad idea. A user can have 5 tabs open in his browser and use them simultaneously.

Why not put all your values in a structure, serialize it to a json string, encrypt that and pass that 1 value as input parameter. On the preparation of the detail screen, decrypt, deserialize and you have all values at once.

In your list screens you could be smart by only encrypting the parameter on the moment you want to go to 1 specific detail screen instead of doing it for all the lines in the preparation.

In my opinion this should be a performant and clean solution to your problem.


Ya it sounds perfect. Encrypt wise I think I am good to proceed, just that I've never involved in any JSON serialize activity or event in my modules. Perhaps sir Tim you can roughly explain to me how it works or maybe a very simple example ? Appreciate it :)

Hi Zh,

On your button click event you can use JSON serialize widget from widget area and pass your structure object in it. It will return json string which you can pass to your destination screen.