Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions lib/src/e2ee/e2ee_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,9 @@ class E2EEManager {

Future<void> ratchetKey({String? participantId, int? keyIndex}) async {
if (participantId != null) {
final newKey = await _keyProvider.ratchetKey(participantId, keyIndex);
if (kDebugMode) {
print('newKey: $newKey');
}
await _keyProvider.ratchetKey(participantId, keyIndex);
} else {
final newKey = await _keyProvider.ratchetSharedKey(keyIndex: keyIndex);
if (kDebugMode) {
print('newKey: $newKey');
}
await _keyProvider.ratchetSharedKey(keyIndex: keyIndex);
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/src/e2ee/key_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import 'dart:convert';
import 'dart:typed_data';

import 'package:flutter_webrtc/flutter_webrtc.dart' as rtc;
Expand Down Expand Up @@ -141,7 +140,7 @@ class BaseKeyProvider implements KeyProvider {
if (!_keys.containsKey(keyInfo.participantId)) {
_keys[keyInfo.participantId] = {};
}
logger.info('_setKey for ${keyInfo.participantId}, idx: ${keyInfo.keyIndex}, key: ${base64Encode(keyInfo.key)}');
logger.info('_setKey for ${keyInfo.participantId}, idx: ${keyInfo.keyIndex}');
_keys[keyInfo.participantId]![keyInfo.keyIndex] = keyInfo.key;
_latestSetIndex[keyInfo.participantId] = keyInfo.keyIndex;
await _keyProvider.setKey(
Expand Down
Loading