pubkeyEncrypt static method
Encrypt data using target public key
Implementation
static Map<String, String> pubkeyEncrypt(
String privateString,
String publicString,
String message,
) {
convert.Utf8Encoder encoder = const convert.Utf8Encoder();
final enced = pubkeyEncryptRaw(privateString, publicString,
Uint8List.fromList(encoder.convert(message)));
return {'enc': convert.base64.encode(enced['enc']), 'iv': enced['iv']};
}