For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Enabling OpenSSL for Cordova iOS

The MobileFirst iOS SDK uses native iOS APIs for cryptography. We can configure the MobileFirst V8.0.0 to use the OpenSSL cryptography library in your Cordova iOS app.

The encryption/decryption functionalities are provided with the following Javascript APIs:

WL.SecurityUtils.encryptText WL.SecurityUtils.decryptWithKey

Option 1: Native encryption/decryption

By default MobileFirst provides native encryption/decryption, without using OpenSSL. This is equivalent to explicitly setting the encryption/decryption behavior:


Option 2: Enabling OpenSSL

MobileFirst provided OpenSSL is disabled by default.

To install the necessary frameworks for supporting OpenSSL, first install the Cordova plug-in:

cordova plugin add cordova-plugin-mfp-encrypt-utils

The following code enables the OpenSSL option for the encryption/decryption:


With this setup, the encryption/decryption calls use OpenSSL as in previous versions of MobileFirst.

Migration options

If you have an IBM MobileFirstâ„¢ Platform Foundation project written in an earlier version, you may need to incorporate changes to continue using OpenSSL.

Parent topic: Developing Cordova apps for iOS