Results 1 to 8 of 8

Thread: QxtBlowfish how to use?

  1. #1
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question QxtBlowfish how to use?

    hi im trying to use qxtcrypto to encrypt and decrypt but im having trouble using the class QxtBlowfish

    in my code

    Qt Code:
    1. #include <QxtBlowfish>
    2. #include <QxtCrypto>
    3.  
    4. QByteArray var = "junk";
    5.  
    6. QxtBlowFish crypt;
    7.  
    8. crypt.setPassword(var);
    9.  
    10. var = crypt.encrypt(var);
    11.  
    12. var = crypt.decrypt(var);
    To copy to clipboard, switch view to plain text mode 

    i got undefine errors
    build/dialogimpl.o(.text+0x10db):dialogimpl.cpp: undefined reference to `QxtBlowFish::QxtBlowFish(QObject*)'
    build/dialogimpl.o(.text+0x1105):dialogimpl.cpp: undefined reference to `QxtBlowFish::setPassword(QByteArray)'
    build/dialogimpl.o(.text+0x1153):dialogimpl.cpp: undefined reference to `QxtBlowFish::encrypt(QByteArray)'
    build/dialogimpl.o(.text+0x11c4):dialogimpl.cpp: undefined reference to `QxtBlowFish::decrypt(QByteArray)'
    build/dialogimpl.o(.text+0x17cf):dialogimpl.cpp: undefined reference to `QxtBlowFish::~QxtBlowFish()'
    build/dialogimpl.o(.text+0x210b):dialogimpl.cpp: undefined reference to `QxtBlowFish::QxtBlowFish(QObject*)'
    build/dialogimpl.o(.text+0x2135):dialogimpl.cpp: undefined reference to `QxtBlowFish::setPassword(QByteArray)'
    build/dialogimpl.o(.text+0x2183):dialogimpl.cpp: undefined reference to `QxtBlowFish::encrypt(QByteArray)'
    build/dialogimpl.o(.text+0x21f4):dialogimpl.cpp: undefined reference to `QxtBlowFish::decrypt(QByteArray)'
    build/dialogimpl.o(.text+0x27ff):dialogimpl.cpp: undefined reference to `QxtBlowFish::~QxtBlowFish()'
    heres my .pro

    Qt Code:
    1. INCLUDEPATH += "C:\libqxt\include\Qxt"
    2. LIBS += -L"C:\libqxt\lib\" -lQxtCrypto
    3. CONFIG += qxt
    4. QXT += crypto
    To copy to clipboard, switch view to plain text mode 

    i did try to include the other libs but nothing happen.. what am i missing?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QxtBlowfish how to use?

    Could you paste the linker output? Oh, and
    Qt Code:
    1. CONFIG += qxt
    2. QXT += crypto
    To copy to clipboard, switch view to plain text mode 
    should be enough provided that the installation of the library succeed.
    J-P Nurmi

  3. #3
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QxtBlowfish how to use?

    when im building it this errors show..

    by the way im using windows is it necessary to install openssl?

    Build (make)...
    c:\Qt\4.4.3\bin\qmake.exe -win32 -o Makefile tryedfile.pro
    C:/Qt/4.4.0/bin/mingw32-make.exe -f Makefile.Release
    mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/RD/Desktop/projects/tryedfile'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,console -o bin\tryedfile.exe build/dialogimpl.o build/main.o build/moc_dialogimpl.o -L"c:\Qt\4.4.3\lib" -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
    mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/RD/Desktop/projects/tryedfile'
    build/dialogimpl.o(.text+0x10db):dialogimpl.cpp: undefined reference to `QxtBlowFish::QxtBlowFish(QObject*)'
    build/dialogimpl.o(.text+0x1105):dialogimpl.cpp: undefined reference to `QxtBlowFish::setPassword(QByteArray)'
    build/dialogimpl.o(.text+0x1153):dialogimpl.cpp: undefined reference to `QxtBlowFish::encrypt(QByteArray)'
    build/dialogimpl.o(.text+0x11c4):dialogimpl.cpp: undefined reference to `QxtBlowFish::decrypt(QByteArray)'
    build/dialogimpl.o(.text+0x17cf):dialogimpl.cpp: undefined reference to `QxtBlowFish::~QxtBlowFish()'
    build/dialogimpl.o(.text+0x210b):dialogimpl.cpp: undefined reference to `QxtBlowFish::QxtBlowFish(QObject*)'
    build/dialogimpl.o(.text+0x2135):dialogimpl.cpp: undefined reference to `QxtBlowFish::setPassword(QByteArray)'
    build/dialogimpl.o(.text+0x2183):dialogimpl.cpp: undefined reference to `QxtBlowFish::encrypt(QByteArray)'
    build/dialogimpl.o(.text+0x21f4):dialogimpl.cpp: undefined reference to `QxtBlowFish::decrypt(QByteArray)'
    build/dialogimpl.o(.text+0x27ff):dialogimpl.cpp: undefined reference to `QxtBlowFish::~QxtBlowFish()'
    collect2: ld returned 1 exit status
    mingw32-make.exe[1]: *** [bin\tryedfile.exe] Error 1
    mingw32-make.exe: *** [release] Error 2
    ---------------------- Build finished with 2 error(s) ----------------------

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QxtBlowfish how to use?

    Yes, OpenSSL is mandatory. You have to pass suitable -L, -l and -I parameters to the configure script. For example something like:
    Qt Code:
    1. configure.bat -I C:\OpenSSL\include -L C:\OpenSSL\lib -l eay32 -l ssleay32
    To copy to clipboard, switch view to plain text mode 
    The configure script will output whether OpenSSL tests failed or passed. You can check config.log for details.
    J-P Nurmi

  5. #5
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QxtBlowfish how to use?

    thanks.. but i got errors now.. i think my qxt0.4 is not up to date because the example functions on the net are different.

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QxtBlowfish how to use?

    QxtBlowfish API got cleaned up quite recently. The last release differs from what's in the version control system.
    J-P Nurmi

  7. #7
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QxtBlowfish how to use?

    where can i get the latest release bro?.. and what version of openSSL should i use?

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QxtBlowfish how to use?

    You can for example download it from http://hg.libqxt.org/.
    J-P Nurmi

  9. The following user says thank you to jpn for this useful post:

    triperzonak (25th February 2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.