Public Member Functions | |
| byte[] | encrypt (byte[] input, String toUserName) |
| byte[] | decrypt (byte[] input, String fromUserName) |
The encryption and decryption class.
You can use built-in encryption and decryption alogrithms based on AES or build your own algorithms by usin EncryptProvider to encrypt or decrypt messages and attachments.
For example, encryption:
When sending a message, if EncryptProvider is configured, the SDK will call the encryption method to encrypt the message before delivery. While receiving a message, if this message is encrypted, the SDK will call the EncryptProvider to decrypt it.
| byte[] io.agora.chat.EMEncryptProvider.decrypt | ( | byte[] | input, |
| String | fromUserName ) |
The decryption method.
| input | The encrypted byte array. |
| fromUserName | The username of the message sender. |
| byte[] io.agora.chat.EMEncryptProvider.encrypt | ( | byte[] | input, |
| String | toUserName ) |
The encryption method.
| input | The byte array to be encrypted. |
| toUserName | The user ID of the other side of the conversation. |