Esempio n. 1
0
 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];
     }
 }
Esempio n. 2
0
 public void InternalSetTweak(ulong[] tweak)
 {
     cipher.SetTweak(tweak);
 }