encodePrivateKey function

Future<String> encodePrivateKey(
  1. String prvKey,
  2. String psw, [
  3. Map<String, dynamic>? options
])

Implementation

Future<String> encodePrivateKey(
  String prvKey,
  String psw, [
  Map<String, dynamic>? options,
]) async {
  try {
    final response = ReceivePort();

    await Isolate.spawn(
      _encodePrivateKey,
      [response.sendPort, prvKey, psw, options],
    );

    return (await response.first) as String;
  } catch (e) {
    rethrow;
  }
}