diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-05 14:14:46 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-05 14:14:46 +0200 |
| commit | a2737677508333c18253730b46b6c368e4743eac (patch) | |
| tree | 7f138914c21784674777a42fd4a1116cf3ed2b01 /src/crypt/cryptclassrc4.cpp | |
| parent | be846db403c29c77bfb72633d87a7c72a48562b6 (diff) | |
| download | IT-Sicherheit-a2737677508333c18253730b46b6c368e4743eac.tar.gz IT-Sicherheit-a2737677508333c18253730b46b6c368e4743eac.zip | |
Add RC4 encryption from OpenSSL
Diffstat (limited to 'src/crypt/cryptclassrc4.cpp')
| -rw-r--r-- | src/crypt/cryptclassrc4.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/crypt/cryptclassrc4.cpp b/src/crypt/cryptclassrc4.cpp new file mode 100644 index 0000000..c1ab511 --- /dev/null +++ b/src/crypt/cryptclassrc4.cpp @@ -0,0 +1,19 @@ +#include "cryptclassrc4.h" + +CryptClassRc4::CryptClassRc4() +{ +} + +void CryptClassRc4::encrypt() +{ + qDebug() << "Encrypt RC4"; + cryptClass.rc4SetKey(m_key); + m_cryptText = cryptClass.rc4Run(m_clearText); +} + +void CryptClassRc4::decrypt() +{ + qDebug() << "Decrypt RC4"; + cryptClass.rc4SetKey(m_key); + m_clearText = cryptClass.rc4Run(m_cryptText); +} |
