Using Agora Built-in Encryption¶
This page describes how to use the Agora built-in encryption.
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.
- Put libagora-crypto.so in the specified path of your project where libagora-rtc-sdk-jni.so is.
- Call setEncryptionSecret to enable the encryption function.
- 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.