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()
Returnmost be retured INTERFACE_VERSION
DescriptionNotify plug-in's INTERFACE version
Common library version4.3.x

getType

int getType()
Returnmost be retured TYPE_CRYPTO_PLUGIN
DescriptionNotify plug-in's type
Common library version4.3.x

initialize

boolean initialize(String arg)
argIt is in system.xml.(plugins/plugin/arg)
Returnresult of initialize
Descriptioninitialize plug-in, only one time call at loading
Common library version4.3.x

canSupportPTT

boolean canSupportPTT()
Returnwhether PTT is supported
Descriptioncheck PTT supporting
Common library version4.3.x

canSupportChat

boolean canSupportChat()
Returnwhether Chat is supported
Descriptioncheck Chat supporting
Common library version4.3.x

canSupportLocation

boolean canSupportLocation()
Returnwhether Location is supported
Descriptioncheck Location supporting
Common library version4.3.x

canSupportVideoShare

boolean canSupportVideoShare()
Returnwhether VideoShare is supported
Descriptioncheck VideoShare supporting
Common library version4.3.x

beginPTT

void beginPTT(int pttChannelId, int lockIndex)
pttChannelIdlocked channelId
lockIndexlocked session index, 0:normal session, 1:master session
DescriptionPTT is started
Common library version4.3.x

encryptPTT

byte[] encryptPTT(int pttChannelId, int lockIndex, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnEncrypted data buffer, The offset must be 0 and data length must be buffer length
pttChannelIdlocked channelId
lockIndexlocked session index, 0:normal session, 1:master session
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptionencrypt PTT packet. The output need to have 16 bytes padding.
Common library version4.3.x

decryptPTT

byte[] decryptPTT(int pttChannelId, int lockIndex, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnDecrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength.
pttChannelIdlocked channelId
lockIndexlocked session index, 0:normal session, 1:master session
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptiondecrypt PTT packet. The padding will be removed at outside of this function.
Common library version4.3.x

endPTT

void endPTT(int pttChannelId, int lockIndex)
pttChannelIdlocked channelId
lockIndexlocked session index, 0:normal session, 1:master session
DescriptionPTT is stopped
Common library version4.3.x

beginVideoShare

void beginVideoShare(int videoChannelId, String userId)
videoChannelIdvideo channelId
userIdannouncer or player
DescriptionVideoShare is started
Common library version4.3.x

encryptVideoShare

byte[] encryptVideoShare(int videoChannelId, String userId, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnEncrypted data buffer, The offset must be 0 and data length must be buffer length
videoChannelIdvideo channelId
userIdannouncer or player
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptionencrypt videoshare packet. The output need to have 16 bytes padding.
Common library version4.3.x

decryptVideoShare

byte[] decryptVideoShare(int videoChannelId, String userId, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnDecrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength.
videoChannelIdvideo channelId
userIdannouncer or player
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptiondecrypt videoshare packet. The padding will be removed at outside of this function.
Common library version4.3.x

endVideoShare

void endVideoShare(int videoChannelId, String userId)
videoChannelIdvideo channelId
userIdannouncer or player
DescriptionVideoShare is stopped
Common library version4.3.x

encryptOther

byte[] encryptOther(CommonConst.CryptoType type, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnEncrypted data buffer, The offset must be 0 and data length must be buffer length
typeinput packet type
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptionencrypt videoshare packet. The output need to have 16 bytes padding.
Common library version4.3.x

decryptOther

byte[] decryptOther(CommonConst.CryptoType type, byte[] inputData, int inputDataOffset, int inputDataLength)
ReturnDecrypted data buffer, The offset must be 0 and data length must be buffer length. The data length would be same with inputDataLength.
typeinput packet type
inputDatainput data buffer
inputDataOffsetinput data buffer offset
inputDataLengthinput data length
Descriptiondecrypt videoshare packet. The padding will be removed at outside of this function.
Common library version4.3.x