encryptData method
- required Uint8List data,
Implementation
Future<EncryptedPacket> encryptData({required Uint8List data}) async {
final participantId = _room?.localParticipant?.identity;
if (participantId == null || _dataPacketCryptor == null) {
throw Exception('DataPacketCryptor is not initialized');
}
return await _dataPacketCryptor!.encrypt(
participantId: participantId,
keyIndex: _keyProvider.getLatestIndex(participantId),
data: data,
);
}