Using Agora Built-in Encryption

Using Agora Built-in Encryption

This page describes how to use the Agora built-in encryption.

../_images/agora-encryption_en.png

Scenario 1: Do Not Use Encryption

Delete the independent dynamic library libagora-crypto.so in the SDK package you have downloaded to reduce the SDK package size.

Scenario 2: Use Encryption (Regardless of the SDK Package Size)

In the Agora Native SDK for Android that you downloaded, it includes an independent dynamic library libagora-crypto.so in both the arm64-v8a and armeabi-v7a folders under /libs for the app to load dynamically.

  1. Put libagora-crypto.so in the specified path of your project where libagora-rtc-sdk-jni.so is.
  2. Call setEncryptionSecret to enable the encryption function.
  3. Call setEncryptionMode to set the encryption mode to be used.

Your data will be encrypted. You can disable the encryption module by removing libagora-crypto.so.

Scenario 3: Use Encryption (Care about the SDK Package Size)

If the application already used libcrypto.so, it can share one libcrypto.so since the SDK package includes one libagora-crypto.so as well.