privateDecryptRaw static method

Uint8List privateDecryptRaw(
  1. String privateString,
  2. String publicString,
  3. Uint8List encdData, [
  4. String b64IV = "",
])

Implementation

static Uint8List privateDecryptRaw(
    String privateString, String publicString, Uint8List encdData,
    [String b64IV = ""]) {
  final secretIV = byteSecret(privateString, publicString);
  final secret = Uint8List.fromList(secretIV[0]);
  final iv = b64IV.length > 6
      ? convert.base64.decode(b64IV)
      : Uint8List.fromList(secretIV[1]);
  Salsa20Engine _cipher = Salsa20Engine();
  _cipher.reset();
  _cipher.init(false, _buildParams(secret, iv));
  return _cipher.process(encdData);
}