Errors:
QtTest -L/usr/local/Trolltech/Qt-4.4.1/lib -lQtGui -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lQtNetwork -lQtCore -lz -lm -lrt -ldl -lpthread
cryptobfuscate.
o: In function `CryptObfuscate
::cryptData(QByteArray const
&,
QByteArray const
&,
int)':cryptobfuscate.cpp:(.text+0xb20): undefined reference to `EVP_md5'
cryptobfuscate.cpp:(.text+0xb27): undefined reference to `EVP_bf_cbc'
cryptobfuscate.cpp:(.text+0xb58): undefined reference to `EVP_BytesToKey'
cryptobfuscate.cpp:(.text+0xb6e): undefined reference to `EVP_CIPHER_CTX_init'
cryptobfuscate.cpp:(.text+0xb73): undefined reference to `EVP_bf_cbc'
cryptobfuscate.cpp:(.text+0xb9c): undefined reference to `EVP_CipherInit_ex'
cryptobfuscate.cpp:(.text+0xbd6): undefined reference to `EVP_CipherUpdate'
cryptobfuscate.cpp:(.text+0xc00): undefined reference to `EVP_CipherFinal_ex'
cryptobfuscate.cpp:(.text+0xc38): undefined reference to `EVP_CIPHER_CTX_cleanup'
collect2: ld returned 1 exit status
make: *** [printsend] Error 1
QtTest -L/usr/local/Trolltech/Qt-4.4.1/lib -lQtGui -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lQtNetwork -lQtCore -lz -lm -lrt -ldl -lpthread
cryptobfuscate.o: In function `CryptObfuscate::cryptData(QByteArray const&, QByteArray const&, int)':
cryptobfuscate.cpp:(.text+0xb20): undefined reference to `EVP_md5'
cryptobfuscate.cpp:(.text+0xb27): undefined reference to `EVP_bf_cbc'
cryptobfuscate.cpp:(.text+0xb58): undefined reference to `EVP_BytesToKey'
cryptobfuscate.cpp:(.text+0xb6e): undefined reference to `EVP_CIPHER_CTX_init'
cryptobfuscate.cpp:(.text+0xb73): undefined reference to `EVP_bf_cbc'
cryptobfuscate.cpp:(.text+0xb9c): undefined reference to `EVP_CipherInit_ex'
cryptobfuscate.cpp:(.text+0xbd6): undefined reference to `EVP_CipherUpdate'
cryptobfuscate.cpp:(.text+0xc00): undefined reference to `EVP_CipherFinal_ex'
cryptobfuscate.cpp:(.text+0xc38): undefined reference to `EVP_CIPHER_CTX_cleanup'
collect2: ld returned 1 exit status
make: *** [printsend] Error 1
To copy to clipboard, switch view to plain text mode
This is the code that this is referring to:
//OpenSSL blowfish encryption
//TODO: Modify to include other encryption algo - (passed by name)
QByteArray CryptObfuscate
::cryptData(const QByteArray
& data,
const QByteArray
& password,
int cmd
)
{
const char initValue[] = "5f7a20de";
const char salt[] = "72jadg07";
unsigned char *buf;
unsigned char *ebuf;
int ebuflen,padlen;
unsigned char iv[EVP_MAX_IV_LENGTH], key[EVP_MAX_KEY_LENGTH];
EVP_CIPHER_CTX ectx;
buf = new unsigned char[data.size()];
ebuf = new unsigned char[data.size() + EVP_MAX_BLOCK_LENGTH ];
memcpy(iv,initValue,sizeof(iv));
if(EVP_BytesToKey(EVP_bf_cbc(), EVP_md5(), reinterpret_cast< const unsigned char*>(salt),
reinterpret_cast< const unsigned char*>(password.constData()) , password.size(), 1, key, iv) <= 0)
EVP_CIPHER_CTX_init(&ectx);
truncated . . . .
//OpenSSL blowfish encryption
//TODO: Modify to include other encryption algo - (passed by name)
QByteArray CryptObfuscate::cryptData(const QByteArray& data, const QByteArray& password, int cmd)
{
const char initValue[] = "5f7a20de";
const char salt[] = "72jadg07";
unsigned char *buf;
unsigned char *ebuf;
int ebuflen,padlen;
unsigned char iv[EVP_MAX_IV_LENGTH], key[EVP_MAX_KEY_LENGTH];
EVP_CIPHER_CTX ectx;
buf = new unsigned char[data.size()];
ebuf = new unsigned char[data.size() + EVP_MAX_BLOCK_LENGTH ];
memcpy(iv,initValue,sizeof(iv));
if(EVP_BytesToKey(EVP_bf_cbc(), EVP_md5(), reinterpret_cast< const unsigned char*>(salt),
reinterpret_cast< const unsigned char*>(password.constData()) , password.size(), 1, key, iv) <= 0)
return QByteArray();
EVP_CIPHER_CTX_init(&ectx);
truncated . . . .
To copy to clipboard, switch view to plain text mode
Bookmarks