chaCha20 method

void chaCha20()

ChaCha20 block function: 20 rounds plus addition of the initial state.

Implementation

void chaCha20() {
  final initialStateCopy = Uint32List.fromList(chaChaState);
  tenQuarterRounds();

  for (int i = 0; i < 16; i++) {
    chaChaState[i] = (chaChaState[i] + initialStateCopy[i]) & 0xFFFFFFFF;
  }
}