i didnt know where to ask this here or the vb section sorry if im in the wrong place but ive been trying to convert this to vb but im not having any luck if anyone can be so kind and help me read or explain it so i can understand how to maybe convert it into vb thanks
VB Code:
  1. void encode(char * what, unsigned int length) {
  2.  
  3.         int counter, x;
  4.  
  5.         for (counter = 4; counter >= 0; counter--) {
  6.  
  7.                 if (counter != 4) what[0] ^= what[length-1];
  8.                 else              what[0] ^= (char)(length);
  9.  
  10.                 for (x = 1; x < (int)length; x++) what[x] ^= what[x-1];
  11.         }
  12. }
  13.  
  14.  
  15.  
  16. void decode(char * what, unsigned int length) {
  17.  
  18.         int counter, x;
  19.  
  20.         for (counter = 0; counter < 5; counter++) {
  21.  
  22.                 for (x = length-1; x > 0; x--) what[x] ^= what[x-1];
  23.  
  24.                 if (counter != 4) what[0] ^= what[length-1];
  25.                 else              what[0] ^= (char)length;
  26.         }
  27. }