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.

mangler.hpp 1.0KB

123456789101112131415161718192021222324252627282930313233343536
  1. // MANGLER.HPP
  2. //
  3. // Copyright (C) 2004-2020 MicroNeil Research Corporation.
  4. //
  5. // This software is released under the MIT license. See LICENSE.TXT.
  6. //
  7. // Derived from Version 1 of Mangler Encryption Algorythm, 1984.
  8. // Derived from Version 2 of Mangler Encryption Algorythm, 1998.
  9. //
  10. // 20020119 _M Mangler V3.
  11. // Mangler object header file.
  12. #pragma once
  13. namespace codedweller {
  14. class Mangler {
  15. private:
  16. unsigned char Fill[256]; // Where to store the fill.
  17. unsigned int Position; // Where to put position.
  18. unsigned char Rotate(unsigned char); // Bitwise Rotate Utility.
  19. unsigned char ChaosDriver(void); // Returns current chaos.
  20. void ChaosDriver(unsigned char i); // Drives chaos forward.
  21. public:
  22. unsigned char Encrypt(unsigned char i); // Returns encrypted data.
  23. unsigned char Decrypt(unsigned char i); // Returns decrypted data.
  24. Mangler(void); // Default.
  25. };
  26. } // End namespace codedweller