Results 1 to 4 of 4

Thread: QxtBlowfish doesn't work

  1. #1
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QxtBlowfish doesn't work

    Hello, I'm trying to use QxtBlowfish in order to encrypt data, but it just doesn't work. Even with documentation's example.

    Qt Code:
    1. QxtBlowfish fish;
    2. fish.setKey("foobar");
    3. QByteArray data("barblah");
    4. data = fish.encrypt(data);
    5. qDebug() << data << data.length();
    6. data = fish.decrypt(data);
    7. qDebug() << data << data.length();
    To copy to clipboard, switch view to plain text mode 

    This code compiles, but will output :

    "" 0
    "" 0

    So it looks like it doesn't work at all... Any idea?

    Thank you in advance.

  2. #2
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QxtBlowfish doesn't work

    No problems here (Debian Sid):
    Qt Code:
    1. "cpI7cihwcQ==" 12
    2. "barblah" 7
    To copy to clipboard, switch view to plain text mode 
    Does the following work?
    Qt Code:
    1. QxtBlowfish fish;
    2. fish.setKey("foobar");
    3. QByteArray data("barblah");
    4. qDebug() << fish.encrypt(data);
    5. // qDebug() <<fish.decrypt(data); // Ignore this - got carried away
    To copy to clipboard, switch view to plain text mode 
    Last edited by norobro; 5th June 2011 at 20:22. Reason: commented line in code

  3. #3
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QxtBlowfish doesn't work

    It returns an empty string... Which version do you use?
    Last edited by fab_74; 8th June 2011 at 19:47.

  4. #4
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QxtBlowfish doesn't work

    Quote Originally Posted by fab_74 View Post
    Which version do you use?
    The last version in which QxtBlowfish was available: 0.5.1

    Here's a link to an old thread.

Similar Threads

  1. QxtBlowfish how to use?
    By triperzonak in forum Newbie
    Replies: 7
    Last Post: 25th February 2009, 10:55
  2. Why this code doesn't work?
    By prykHetQuo in forum Qt Programming
    Replies: 2
    Last Post: 11th February 2009, 19:08
  3. activateWindow() doesn't work
    By roxton in forum Qt Programming
    Replies: 8
    Last Post: 26th December 2008, 09:49
  4. why doesn't the button work?
    By mattia in forum Newbie
    Replies: 18
    Last Post: 5th November 2007, 12:14
  5. setWindowOpacity doesn't work!
    By nupul in forum Qt Programming
    Replies: 5
    Last Post: 21st April 2006, 18:28

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.