summaryrefslogtreecommitdiffstats
path: root/src/crypt/cryptclassrc4.cpp
blob: 7be4c60dfc1e60da75a8b8fbe2807e9e2e0f9328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "cryptclassrc4.h"

CryptClassRc4::CryptClassRc4()
    :CryptClassBase()
{
}

void CryptClassRc4::encrypt()
{
    qDebug() << "Encrypt RC4";
    cryptClass.rc4SetKeyOwn(m_key);
    m_cryptText = cryptClass.rc4RunOwn(m_clearText);
}

void CryptClassRc4::decrypt()
{
    qDebug() << "Decrypt RC4";
    cryptClass.rc4SetKey(m_key);
    m_clearText = cryptClass.rc4Run(m_cryptText);
}