pubkeyEncryptRaw static method
Implementation
static Map pubkeyEncryptRaw(
String privateString,
String publicString,
Uint8List data,
) {
final secretIV = byteSecret(privateString, publicString);
final secret = Uint8List.fromList(secretIV[0]);
final iv = Uint8List.fromList(secretIV[1]);
Salsa20Engine _cipher = Salsa20Engine();
_cipher.reset();
_cipher.init(true, _buildParams(secret, iv));
final Uint8List encData = _cipher.process(data);
return {'enc': encData, 'iv': convert.base64.encode(iv)};
}