rotateForRSA method

Future<void> rotateForRSA()

Rotates the keys (the backup key becomes currently used and new key is generated as backup).

Implementation

Future<void> rotateForRSA() async {
  var isCorrectUuid =
      await _channel.invokeMethod('checkUuid', {'uuid': uuid});
  if (isCorrectUuid) {
    await _channel.invokeMethod("rotateForRSA", {'uuid': uuid});
  } else {
    throw IncorrectUuidException(
        'There are no keys associated with this UUID saved on the device');
  }
}