summaryrefslogtreecommitdiffstats
path: root/src/crypt/cryptclassbase.cpp
blob: ac4a812c2f1b721ed7b8c2f40d9ca572c61405db (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
#include "src/crypt/cryptclassbase.h"

CryptClassBase::CryptClassBase()
{
}

CryptClassBase::~CryptClassBase()
{
    m_key.fill(0);
    m_cryptText.fill(0);
    m_clearText.fill(0);
    m_binaryData = false;
    m_keyLength = 0;
}

void CryptClassBase::generateRandomKey()
{
    qDebug("CryptClassBase::generateRandomKey - This Method does nothing so far!");
}

void CryptClassBase::setKey(QByteArray value)
{
    m_key = value;
}

void CryptClassBase::setKey(const uchar* value, int keyLength )
{
    m_key.setRawData( (const char*)value, keyLength );
}

void CryptClassBase::setCryptText( QByteArray   value )
{
    m_cryptText = value;
}

void CryptClassBase::setCryptText( const uchar* value, int dataLength )
{
    m_cryptText.setRawData( (const char*)value, dataLength );
}

void CryptClassBase::setClearText( QByteArray value )
{
    m_clearText = value;
}

void CryptClassBase::setClearText( const uchar* value, int dataLength )
{
    m_clearText.setRawData( (const char*)value, dataLength );
}