signMessage method

  1. @override
Future<SuccessSign> signMessage({
  1. required String message,
  2. required Certificate certificate,
  3. required String password,
  4. required CAdESFormat format,
  5. bool isDetached = true,
  6. bool signHash = false,
  7. bool disableOnlineValidation = false,
  8. String? tsaUrl,
  9. String? storageName,
})
override

Подписать сообщение

Implementation

@override
Future<SuccessSign> signMessage({
  required String message,
  required Certificate certificate,
  required String password,
  required CAdESFormat format,
  bool isDetached = true,
  bool signHash = false,
  bool disableOnlineValidation = false,
  String? tsaUrl,
  String? storageName,
}) async {
  String response = await methodChannel.invokeMethod(
    "signMessage",
    {
      "message": message,
      "alias": certificate.alias,
      "password": password,
      "isDetached": isDetached,
      "signHash": signHash,
      "disableOnlineValidation": disableOnlineValidation,
      "format": format.name,
      "tsaUrl": tsaUrl,
      "storageName": storageName,
    },
  );
  Map<String, dynamic> map = json.decode(response);
  return SuccessSign.fromMap(map);
}