Errors:
Qt Code:
  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
  2. cryptobfuscate.o: In function `CryptObfuscate::cryptData(QByteArray const&, QByteArray const&, int)':
  3. cryptobfuscate.cpp:(.text+0xb20): undefined reference to `EVP_md5'
  4. cryptobfuscate.cpp:(.text+0xb27): undefined reference to `EVP_bf_cbc'
  5. cryptobfuscate.cpp:(.text+0xb58): undefined reference to `EVP_BytesToKey'
  6. cryptobfuscate.cpp:(.text+0xb6e): undefined reference to `EVP_CIPHER_CTX_init'
  7. cryptobfuscate.cpp:(.text+0xb73): undefined reference to `EVP_bf_cbc'
  8. cryptobfuscate.cpp:(.text+0xb9c): undefined reference to `EVP_CipherInit_ex'
  9. cryptobfuscate.cpp:(.text+0xbd6): undefined reference to `EVP_CipherUpdate'
  10. cryptobfuscate.cpp:(.text+0xc00): undefined reference to `EVP_CipherFinal_ex'
  11. cryptobfuscate.cpp:(.text+0xc38): undefined reference to `EVP_CIPHER_CTX_cleanup'
  12. collect2: ld returned 1 exit status
  13. make: *** [printsend] Error 1
To copy to clipboard, switch view to plain text mode 

This is the code that this is referring to:

Qt Code:
  1. //OpenSSL blowfish encryption
  2.  
  3. //TODO: Modify to include other encryption algo - (passed by name)
  4.  
  5. QByteArray CryptObfuscate::cryptData(const QByteArray& data, const QByteArray& password, int cmd)
  6.  
  7. {
  8.  
  9.  
  10.  
  11.  
  12.  
  13. const char initValue[] = "5f7a20de";
  14.  
  15. const char salt[] = "72jadg07";
  16.  
  17.  
  18.  
  19. unsigned char *buf;
  20.  
  21. unsigned char *ebuf;
  22.  
  23. int ebuflen,padlen;
  24.  
  25. unsigned char iv[EVP_MAX_IV_LENGTH], key[EVP_MAX_KEY_LENGTH];
  26.  
  27. EVP_CIPHER_CTX ectx;
  28.  
  29.  
  30.  
  31. buf = new unsigned char[data.size()];
  32.  
  33. ebuf = new unsigned char[data.size() + EVP_MAX_BLOCK_LENGTH ];
  34.  
  35.  
  36.  
  37. memcpy(iv,initValue,sizeof(iv));
  38.  
  39.  
  40.  
  41. if(EVP_BytesToKey(EVP_bf_cbc(), EVP_md5(), reinterpret_cast< const unsigned char*>(salt),
  42.  
  43. reinterpret_cast< const unsigned char*>(password.constData()) , password.size(), 1, key, iv) <= 0)
  44.  
  45. return QByteArray();
  46.  
  47.  
  48.  
  49. EVP_CIPHER_CTX_init(&ectx);
  50.  
  51. truncated . . . .
To copy to clipboard, switch view to plain text mode