ratchetKey method

Future<void> ratchetKey(
  1. {String? participantId,
  2. int? keyIndex}
)

Implementation

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