Results 1 to 9 of 9

Thread: How to secure a file by password

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    42
    Thanks
    8
    Qt products
    Qt4 Qt/Embedded

    Default

    Hi, i am creating a texteditor using QT. I was trying to set a password for a file. What mechanism or class should i use to set a password for a file ??

    Can you give me a minimal example that how i can make use of it in my project ??


    Added after 55 minutes:


    What is the QFile::EncoderFn and QFile::DecoderFn used for ??
    Last edited by wysota; 22nd March 2011 at 09:13.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Set a password for a file

    Depends on your specification - do you want to add a password to a file, or encrypt a file to protect the file being opened without the password ?

  3. #3
    Join Date
    Jan 2011
    Posts
    42
    Thanks
    8
    Qt products
    Qt4 Qt/Embedded

    Default Re: Set a password for a file

    Ya. I want to add password for a file so that it will be opened if the password is correct.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Set a password for a file

    As stated before the threads were merged, use the Qt Cryptographic Architecture.

    How to use QCA depends on your specifications - the first thing you need is a cipher, and then you need to decide how to encrypt/decrypt the data using your password.

  5. #5
    Join Date
    Aug 2008
    Posts
    70
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Set a password for a file

    You can find an example here: http://quickgit.kde.org/?p=skrooge.g...kgservices.cpp, in function SKGServices::cryptFile.

Similar Threads

  1. Apparent error in QtCore/quuid.h
    By cwp500 in forum Qt Programming
    Replies: 11
    Last Post: 18th December 2008, 20:51
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. QHttp GET File & Password
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 11th June 2006, 13:04

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.