PDA

View Full Version : Encryption with Qt



safknw
21st August 2006, 14:33
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.

e8johan
21st August 2006, 14:59
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.

wysota
21st August 2006, 15:00
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 (http://doc.trolltech.com/qq) 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.

safknw
21st August 2006, 15:10
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.

ball
21st August 2006, 16:31
Try QCA please:

http://delta.affinix.com/qca/

wysota
21st August 2006, 18:11
If u hav any other encryption algorithm in C++ , pls send me.


const uint mysecretkey = 732423;
char encryptdecrypt(char x){
return x ^ mysecretkey;
}
:)

RolandHughes
11th July 2012, 16:04
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.

ChrisW67
11th July 2012, 16:06
Rubbish. Was there really a need to wake a 6 year-old thread to add this?