Guest User

Untitled

a guest
May 21st, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public byte MixTable()
  2. {
  3. // Re-calculate table fields
  4. this.i = ((this.i + 1) % 256);
  5. this.j = ((j + pSBox[i]) % 256);
  6.  
  7. // Swap table fields
  8. int bSwap = pSBox[this.i];
  9. pSBox[this.i] = pSBox[this.j];
  10. pSBox[this.j] = bSwap;
  11.  
  12. return (byte)pSBox[(pSBox[this.i] + pSBox[this.j]) % 256];
  13. }
Add Comment
Please, Sign In to add comment