Reference of ICryptoPlugin
Description of ICryptoPlugin. ICryptoPlugin is in Plugin V4.3 and above.
In plug-in, developers can support to use customer's encryption module.
IPTTPlugin4
IVideoPlugin3
IPublicGWPlugin
ICryptoPlugin
getInterfaceVersion
| int getInterfaceVersion() |
| Return | most be retured INTERFACE_VERSION |
| Description | Notify plug-in's INTERFACE version |
| Common library version | 4.3.x |
getType
| int getType() |
| Return | most be retured TYPE_CRYPTO_PLUGIN |
| Description | Notify plug-in's type |
| Common library version | 4.3.x |
initialize
| boolean initialize(String arg) |
| arg | It is in system.xml.(plugins/plugin/arg) |
| Return | result of initialize |
| Description | initialize plug-in, only one time call at loading |
| Common library version | 4.3.x |
canSupportPTT
| boolean canSupportPTT() |
| Return | whether PTT is supported |
| Description | check PTT supporting |
| Common library version | 4.3.x |
canSupportChat
| boolean canSupportChat() |
| Return | whether Chat is supported |
| Description | check Chat supporting |
| Common library version | 4.3.x |
canSupportLocation
| boolean canSupportLocation() |
| Return | whether Location is supported |
| Description | check Location supporting |
| Common library version | 4.3.x |
canSupportVideoShare
| boolean canSupportVideoShare() |
| Return | whether VideoShare is supported |
| Description | check VideoShare supporting |
| Common library version | 4.3.x |
beginPTT
| void beginPTT(int pttChannelId, int lockIndex) |
| pttChannelId | locked channelId |
| lockIndex | locked session index, 0:normal session, 1:master session |
| Description | PTT is started |
| Common library version | 4.3.x |
encryptPTT
| byte[] encryptPTT(int pttChannelId, int lockIndex, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Encrypted data buffer, The offset must be 0 and data length must be buffer length |
| pttChannelId | locked channelId |
| lockIndex | locked session index, 0:normal session, 1:master session |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | encrypt PTT packet. The output need to have 16 bytes padding. |
| Common library version | 4.3.x |
decryptPTT
| byte[] decryptPTT(int pttChannelId, int lockIndex, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Decrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength. |
| pttChannelId | locked channelId |
| lockIndex | locked session index, 0:normal session, 1:master session |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | decrypt PTT packet. The padding will be removed at outside of this function. |
| Common library version | 4.3.x |
endPTT
| void endPTT(int pttChannelId, int lockIndex) |
| pttChannelId | locked channelId |
| lockIndex | locked session index, 0:normal session, 1:master session |
| Description | PTT is stopped |
| Common library version | 4.3.x |
beginVideoShare
| void beginVideoShare(int videoChannelId, String userId) |
| videoChannelId | video channelId |
| userId | announcer or player |
| Description | VideoShare is started |
| Common library version | 4.3.x |
encryptVideoShare
| byte[] encryptVideoShare(int videoChannelId, String userId, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Encrypted data buffer, The offset must be 0 and data length must be buffer length |
| videoChannelId | video channelId |
| userId | announcer or player |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | encrypt videoshare packet. The output need to have 16 bytes padding. |
| Common library version | 4.3.x |
decryptVideoShare
| byte[] decryptVideoShare(int videoChannelId, String userId, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Decrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength. |
| videoChannelId | video channelId |
| userId | announcer or player |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | decrypt videoshare packet. The padding will be removed at outside of this function. |
| Common library version | 4.3.x |
endVideoShare
| void endVideoShare(int videoChannelId, String userId) |
| videoChannelId | video channelId |
| userId | announcer or player |
| Description | VideoShare is stopped |
| Common library version | 4.3.x |
encryptOther
| byte[] encryptOther(CommonConst.CryptoType type, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Encrypted data buffer, The offset must be 0 and data length must be buffer length |
| type | input packet type |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | encrypt videoshare packet. The output need to have 16 bytes padding. |
| Common library version | 4.3.x |
decryptOther
| byte[] decryptOther(CommonConst.CryptoType type, byte[] inputData, int inputDataOffset, int inputDataLength) |
| Return | Decrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength. |
| type | input packet type |
| inputData | input data buffer |
| inputDataOffset | input data buffer offset |
| inputDataLength | input data length |
| Description | decrypt videoshare packet. The padding will be removed at outside of this function. |
| Common library version | 4.3.x |