summaryrefslogtreecommitdiffstats
path: root/src/crypt/cryptclasscaesar.h
blob: 899136b864b59f8d7afbdd0dc81476c54d6e3c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef CRYPTCLASSCAESAR_H
#define CRYPTCLASSCAESAR_H

#include "cryptclassbase.h"
#include <QMap>
#include <QDebug>
#include <QMessageBox>

class CryptClassCaesar : public CryptClassBase
{
public:
    CryptClassCaesar();
    ~CryptClassCaesar();

    // CryptClassBase interface
public:
    void encrypt();
    void decrypt();

private:
    void buildMap();

    int oldKey;
    QMap<char, char> substitutionsMap;

    const static int LOWERBOUND;
    const static int UPPERBOUND;
    QByteArray stripUmlauts(QByteArray umlautText);
};

#endif // CRYPTCLASSCAESAR_H