You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738
  1. // MANGLER.HPP
  2. //
  3. // (C) 1984-2009 MicroNeil Research Corporation
  4. // Derived from Version 1 of Mangler Encryption Algorythm, 1984.
  5. // Derived from Version 2 of Mangler Encryption Algorythm, 1998.
  6. //
  7. // 20020119 _M Mangler V3.
  8. // Mangler object header file.
  9. // If it's already been included, it doesn't need to be included again.
  10. #ifndef _MANGLER_
  11. #define _MANGLER_
  12. namespace CodeDweller {
  13. class MANGLER {
  14. private:
  15. unsigned char Fill[256]; // Where to store the fill.
  16. unsigned int Position; // Where to put position.
  17. unsigned char Rotate(unsigned char); // Bitwise Rotate Utility.
  18. unsigned char ChaosDriver(void); // Returns current chaos.
  19. void ChaosDriver(unsigned char i); // Drives chaos forward.
  20. public:
  21. unsigned char Encrypt(unsigned char i); // Returns encrypted data.
  22. unsigned char Decrypt(unsigned char i); // Returns decrypted data.
  23. MANGLER(void); // Default.
  24. };
  25. }
  26. #endif