private void ProcessBlock(int bytes) { // Set the key to the current state cipher.SetKey(state); // Update tweak UbiParameters.BitsProcessed += (ulong)bytes; cipher.SetTweak(UbiParameters.Tweak); // Encrypt block cipher.Encrypt(cipherInput, state); // Feed-forward input with state for (int i = 0; i < cipherInput.Length; i++) { state[i] ^= cipherInput[i]; } }
public void InternalSetTweak(ulong[] tweak) { cipher.SetTweak(tweak); }