Results 1 to 3 of 3

Thread: Checksum generation (used to compare two or more files)

  1. #1
    Join Date
    Jul 2007
    Posts
    8
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Checksum generation (used to compare two or more files)

    please help,
    i have to compare both file from diferent client whether same or not. currently i use QProcess::start() to run cksum command (actually linux command) to check file checksum but this methode took sometime.

    does anyone has simple and accurate method on how to compare the file..?
    if possible please copy the code,
    thanks for help
    --comlink21

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Checksum generation (used to compare two or more files)

    Read both files into memory and check with QCryptographicHash

  3. #3
    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: Checksum generation (used to compare two or more files)

    Or use qChecksum() instead of launching external processes.
    J-P Nurmi

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.