class bitString { //Stuff for the 31 bits void flipBit(int bitPlace); } class asciiLetter { //Stuff for the 7 bit ascii code int getBit(int bitPlace); } for (int index=1; index<=numberOfLettersInOurMessage; index++) { asciiLetter currentLetter = getNextLetterInOurMessage(); for(int j=1; j<= 7; j++) { bitString = getTheirNext31BitString(); //Xor encryption if (currentLetter.getBit(i) == 1) bitString.flipBit(i); } }