encodePhrase function

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

Implementation

Future<String> encodePhrase(
  String prvKey,
  String psw, [
  Map<String, dynamic>? options,
]) async {
  final response = ReceivePort();
  try {
    await Isolate.spawn(
      _encodePhrase,
      [response.sendPort, prvKey, psw, options],
    );

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