Преглед на файлове

cleaned up namespace in mangler

master
Pete McNeil преди 4 години
родител
ревизия
867e036af4
променени са 2 файла, в които са добавени 10 реда и са изтрити 9 реда
  1. 5
    3
      mangler.cpp
  2. 5
    6
      mangler.hpp

+ 5
- 3
mangler.cpp Целия файл

@@ -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

+ 5
- 6
mangler.hpp Целия файл

@@ -1,15 +1,15 @@
// MANGLER.HPP
//
// (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.
//
// 20020119 _M Mangler V3.
// Mangler object header file.
// If it's already been included, it doesn't need to be included again.

#ifndef _MANGLER_
#define _MANGLER_
#pragma once

namespace codedweller {

class MANGLER {
private:
@@ -30,5 +30,4 @@ class MANGLER {
MANGLER(void); // Default.
};

#endif

} // End namespace codedweller

Loading…
Отказ
Запис