I am trying to write a type of scrambling code, and below is an image of the desired functionality. The functionality of this particular scrambling code was included in a do