Kaynağa Gözat

cleaned up namespace in mangler

master
Pete McNeil 3 yıl önce
ebeveyn
işleme
867e036af4
2 değiştirilmiş dosya ile 10 ekleme ve 9 silme
  1. 5
    3
      mangler.cpp
  2. 5
    6
      mangler.hpp

+ 5
- 3
mangler.cpp Dosyayı Görüntüle

// MANGLER.CPP // 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 1 of Mangler Encryption Algorythm, 1984.
// Derived from Version 2 of Mangler Encryption Algorythm, 1998. // Derived from Version 2 of Mangler Encryption Algorythm, 1998.
// //


#include "mangler.hpp" #include "mangler.hpp"


namespace codedweller {

unsigned char MANGLER::ChaosDriver(void) { // Return the current unsigned char MANGLER::ChaosDriver(void) { // Return the current
return Fill[Fill[Position]^Fill[Position^0xff]]; // chaos engine output return Fill[Fill[Position]^Fill[Position^0xff]]; // chaos engine output
} // value. } // value.
return g; // to demodulate the input. return g; // to demodulate the input.
} // then drive the engine } // then drive the engine
// with the original input. // with the original input.
MANGLER::MANGLER(void) : Position(0) { // The default constructor sets MANGLER::MANGLER(void) : Position(0) { // The default constructor sets
for(unsigned int c = 0;c<256;c++) // the key to the root primary for(unsigned int c = 0;c<256;c++) // the key to the root primary
Fill[c]=(unsigned char) c; // value and Position to 0. Fill[c]=(unsigned char) c; // value and Position to 0.
} }


} // End namespace codedweller

+ 5
- 6
mangler.hpp Dosyayı Görüntüle

// MANGLER.HPP // 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 1 of Mangler Encryption Algorythm, 1984.
// Derived from Version 2 of Mangler Encryption Algorythm, 1998. // Derived from Version 2 of Mangler Encryption Algorythm, 1998.
// //
// 20020119 _M Mangler V3. // 20020119 _M Mangler V3.
// Mangler object header file. // 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 { class MANGLER {
private: private:
MANGLER(void); // Default. MANGLER(void); // Default.
}; };


#endif

} // End namespace codedweller

Loading…
İptal
Kaydet