Skip to content

ECB Cryptor migration

Olga Koroleva edited this page Nov 9, 2022 · 1 revision

Starting from 6.0.0 SDK version we've removed deprecated ECBCryptorImpl from SDK. If you have installations of the application with MobileMessaging SDK version < 5.0.0, use withCryptorMigration builder method with providing old cryptor, so MobileMessaging SDK will migrate encrypted data using the new cryptor.

Check Cryptor migration example

Declare an additional dependency in your application's build.gradle file:

dependencies {
    ...
    implementation 'com.infobip:infobip-mobile-messaging-android-cryptor-migration:6.2.0@aar'
}

Provide ECBCryptorImpl instance to the MobileMessaging.Builder :

import org.infobip.mobile.messaging.cryptor.ECBCryptorImpl;
import org.infobip.mobile.messaging.util.DeviceInformation
...

val oldCryptor = ECBCryptorImpl(DeviceInformation.getDeviceID(application))
MobileMessaging.Builder(application)
                .withCryptorMigration(oldCryptor)
                .build()
expand to see Java code

import org.infobip.mobile.messaging.cryptor.ECBCryptorImpl;
import org.infobip.mobile.messaging.util.DeviceInformation
...

ECBCryptorImpl oldCryptor = new ECBCryptorImpl(DeviceInformation.getDeviceID(getApplication()));
new MobileMessaging.Builder(getApplication())
                .withCryptorMigration(oldCryptor)
                .build();
Clone this wiki locally