private void ProcessBlock(ulong[] output) { engine.threefish.Init(true, engine.chain, tweak.GetWords()); for (int i = 0; i < message.Length; i++) { message[i] = ThreefishEngine.BytesToWord(currentBlock, i * 8); } engine.threefish.ProcessBlock(message, output); for (int i = 0; i < output.Length; i++) { output[i] ^= message[i]; } }
private void ProcessBlock(ulong[] output) { engine.threefish.Init(forEncryption: true, engine.chain, tweak.GetWords()); for (int i = 0; i < message.Length; i++) { message[i] = ThreefishEngine.BytesToWord(currentBlock, i * 8); } engine.threefish.ProcessBlock(message, output); for (int j = 0; j < output.Length; j++) { ulong[] array; ulong[] array2 = (array = output); int num = j; global::System.IntPtr intPtr = (global::System.IntPtr)num; array2[num] = array[(long)intPtr] ^ message[j]; } }