sign method
Signs provided message using RSA. Returns signature if successfully signed.
Implementation
Future<String> sign(String message) async {
var isCorrectUuid =
await _channel.invokeMethod('checkUuid', {'uuid': uuid});
if (isCorrectUuid) {
var signature = await _channel
.invokeMethod("signRSA", {'uuid': uuid, 'message': message});
return signature;
} else {
throw IncorrectUuidException(
'There are no keys associated with this UUID saved on the device');
}
}