getNextPubKey method

Future<String> getNextPubKey()

Returns second/backup public key for RSA signer.

Implementation

Future<String> getNextPubKey() async {
  var isCorrectUuid =
      await _channel.invokeMethod('checkUuid', {'uuid': uuid});
  if (isCorrectUuid) {
    var key =
        await _channel.invokeMethod("getRSAKey", {'alias': "${uuid}_1_rsa"});
    return key;
  } else {
    throw IncorrectUuidException(
        'There are no keys associated with this UUID saved on the device');
  }
}