| 1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the libqxp project. |
| 4 |
* |
| 5 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
*/ |
| 9 |
|
| 10 |
#ifndef QXP4DEOBFUSCATOR_H_INCLUDED |
| 11 |
#define QXP4DEOBFUSCATOR_H_INCLUDED |
| 12 |
|
| 13 |
#include "libqxp_utils.h" |
| 14 |
#include "QXPDeobfuscator.h" |
| 15 |
|
| 16 |
namespace libqxp |
| 17 |
{ |
| 18 |
|
| 19 |
class QXP4Deobfuscator : public QXPDeobfuscator |
| 20 |
{ |
| 21 |
public: |
| 22 |
QXP4Deobfuscator(uint16_t seed, uint16_t increment); |
| 23 |
|
| 24 |
void next(uint16_t block); |
| 25 |
void nextRev(); |
| 26 |
void nextShift(uint16_t count); |
| 27 |
|
| 28 |
private: |
| 29 |
uint16_t m_increment; |
| 30 |
}; |
| 31 |
|
| 32 |
} |
| 33 |
|
| 34 |
#endif // QXP4DEOBFUSCATOR_H_INCLUDED |
| 35 |
|
| 36 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |