AES256 Encryption And Decryption


Mark Stow
Hi David, do you have an Samples of using aes256 to encrypt and decrypt data? I have found this Cordova-AES256 Encryption And Decryption (https://github.com/Ideas2IT/cordova-aes256), but i cant seem to make it work. Thank you for your time

DecSoft

Hello Mark,

Various things to consider here: maybe the first one is that I am not an expert in encryption/decryption. Maybe we can try to use the Cordova plugin that you mentioned, however, what about to use a JavaScript library like CryptoJS?

You can try it by downloading the latest release from here: https://github.com/brix/crypto-js/releases. Once download, look for a "crypto-js.js" file, which is what you must include in the app using the Files manager. Once you do that, the below code can be run and apparently works like a charm:

Maybe it's enough to use the referred library? On the other hand, what is the purpose of the encryption / decryption? For example, thinking to send some data over HTTP, the best is probably to use HTTPS instead, so we no need to encrypt / decrypt.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.