Results 1 to 8 of 8

Thread: Encryption with Qt

  1. #1
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Encryption with Qt

    I want to encrypt a video file and want to play this encrypted file in mplayer.
    Is there any api for encryption in Qt. I'm a newbie for encryption so also give some sample code.

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Encryption with Qt

    Two things.

    #1. What file format do you want to use. Does mplayer support this format?

    #2. Qt does not support encryption, nor writing media files.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Encryption with Qt

    Depends what type of encryption you are talking about... Does mplayer support playing "encrypted" files? I don't think so, so you'd have to decrypt the file before feeding it to mplayer. It should allow playing from stdin, so take a look at QProcess (to call mplayer) and QIODevice class (to implement stream encryption), an example is available on Qt Quarterly in an article about creating custom QIODevices.

    BTW. Maybe you mean "encode" and not "encrypt"? Encrypting involves using a cipher mechanism which prevents unauthorised access to contents of the encrypted message.

  4. #4
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Encryption with Qt

    Quote Originally Posted by e8johan
    Two things.

    #1. What file format do you want to use. Does mplayer support this format?
    I want to use avi and mpg Files
    #2. Qt does not support encryption, nor writing media files.
    If u hav any other encryption algorithm in C++ , pls send me.

  5. #5
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Encryption with Qt


  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Encryption with Qt

    Quote Originally Posted by safknw
    If u hav any other encryption algorithm in C++ , pls send me.
    Qt Code:
    1. const uint mysecretkey = 732423;
    2. char encryptdecrypt(char x){
    3. return x ^ mysecretkey;
    4. }
    To copy to clipboard, switch view to plain text mode 

  7. The following user says thank you to wysota for this useful post:

    safknw (25th August 2006)

  8. #7
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Encryption with Qt

    Libraries based on run-time plugins are not useful for production or commercial development. One needs to be able to static link when releasing into the wild.

  9. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Encryption with Qt

    Rubbish. Was there really a need to wake a 6 year-old thread to add this?

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.