cryptoStream static method

int cryptoStream(
  1. Uint8List c,
  2. int cpos,
  3. int d,
  4. Uint8List n,
  5. Uint8List k,
)

Implementation

static int cryptoStream(
    Uint8List c, int cpos, int d, Uint8List n, Uint8List k) {
  Uint8List s = Uint8List(32);
  cryptoCoreHsalsa20(s, n, k, _sigma);
  Uint8List sn = Uint8List(8);
  for (int i = 0; i < 8; i++) sn[i] = n[i + 16];
  return cryptoStreamSalsa20(c, cpos, d, sn, s);
}