| 
				
			 | 
			
			 | 
			@@ -1,6 +1,6 @@ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// MANGLER.CPP | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// (C) 1984-2009 MicroNeil Research Corporation | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// (C) 1984-2020 MicroNeil Research Corporation | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// Derived from Version 1 of Mangler Encryption Algorythm, 1984. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// Derived from Version 2 of Mangler Encryption Algorythm, 1998. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			// | 
		
		
	
	
		
			
			| 
				
			 | 
			
			 | 
			@@ -18,6 +18,8 @@ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			#include "mangler.hpp" | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			namespace codedweller { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			unsigned char MANGLER::ChaosDriver(void) {          // Return the current | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  return Fill[Fill[Position]^Fill[Position^0xff]];  // chaos engine output | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }                                                 // value. | 
		
		
	
	
		
			
			| 
				
			 | 
			
			 | 
			@@ -97,10 +99,10 @@ unsigned char MANGLER::Decrypt(unsigned char i) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			   return g;                                    // to demodulate the input. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			   }                                            // then drive the engine | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                                // with the original input. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			MANGLER::MANGLER(void) : Position(0) {          // The default constructor sets | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			   for(unsigned int c = 0;c<256;c++)            // the key to the root primary | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Fill[c]=(unsigned char) c;                // value and Position to 0. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			   } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} // End namespace codedweller |