blob: ae05ef6350c9bdba46b987d1417bbb80b65bcf5e (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#ifndef CRYPTCLASSNULLCIPHER_H
#define CRYPTCLASSNULLCIPHER_H
#include "cryptclassbase.h"
#include <QDebug>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/conf.h>
/**
* \class CryptClassNullCipher
* \brief For testing purposes, NullCipher does nothing to the Text.
*
* The NullCipher class is, like all Ciphers/Algorithm-classes, derived from CryptclassBase.
* It's intended to be used for testing purposes of the overall Programm-Funcionality only and does
* no encryption whatsoever. Data is merely copied from m_cryptText to m_clearText and vice versa.
* \author Uwe Gogolin [Gogolin.Uwe@FH-SWF.de]
* \version 0.1
* \date 28.02.2013
*/
class CryptClassNullCipher : public CryptClassBase
{
public: //Methods
/**
* \brief Class Constructor.
*
* Class Constructor. Initializes openssl.
*/
CryptClassNullCipher();
/**
* \brief Class Destructor.
*
* Class Destructor. Deinitializes openssl.
*/
~CryptClassNullCipher();
/**
* \brief Overloaded Method to encrypt present unencrypted data using the current key.
*
* NullCipher is used for testing purposes and simulation. No actual encryption is done.
* Data is copied from m_clearText to m_cryptText.
*/
virtual void encrypt();
/**
* \brief Overloaded Method to decrypt present encrypted data using the current key.
*
* NullCipher is used for testing purposes and simulation. No actual decryption is done.
* Data is copied from m_cryptText to m_clearText.
*/
virtual void decrypt();
private:
void handleErrors();
};
#endif // CRYPTCLASSNULLCIPHER_H
|