cryptoSecretbox static method

int cryptoSecretbox(
  1. Uint8List c,
  2. Uint8List m,
  3. int d,
  4. Uint8List n,
  5. Uint8List k,
)

Implementation

static int cryptoSecretbox(
    Uint8List c, Uint8List m, int d, Uint8List n, Uint8List k) {
  if (d < 32) return -1;
  cryptoStreamXor(c, 0, m, 0, d, n, k);
  _cryptoOnetimeauth(c, 16, c, 32, d - 32, c);

  ///for (i = 0; i < 16; i++) c[i] = 0;
  return 0;
}