views:

70

answers:

1

Hi All,

This question has been asked many times before by others, but somehow the answers made me more confused.

In my Qt application (for symbian devices), I have a file with user details (Email ids n passwords) which I store in target device, so want to encrypt this data in the file to keep it secure. I don't need a super secure encryption techniques, just any moderate one would do. How can I do this using Qt?

I downloaded QCA and tried installing but it failed on Verifying Qt 4 build env.. Reason:Unable to find the qmake tool for Qt 4. (I've set the QTDIR to the installed qt path)

Can someone direct me to proper installation steps, examples or alternatives to QCA? (or may be even Symbian encryption APIs would do)

Thanks

+1  A: 

You can also use the data caging provided by the operating system and store your files in the application's private directory. You can get its location with QApplication::applicationDirPath().

For encryption in Qt apps I usually use the plain old openssl C library. It's also available on Symbian devices.

laalto
Thanks bud will try them :)
new_to_qt
applicationDirPath is the directory the executable is in, which is usually not user-writable. For storing settings, there is QSettings, but that doesn't do encryption (But one can store key/value pairs with encrypted content of course).
Frank
@Frank: On Symbian, `applicationDirPath()` is the app's private directory i.e. `\private\<uid>` on app installation drive. It's read-write by the process having that UID but inaccessible by other processes without `AllFiles` capability.
laalto
Don't rely on data caging alone unless you restrict installation to the internal drive - perfectly feasible to install to memory card, then put the card into a PC. Nothing to stop you reaching \private files and analysing them on your PC.
KevinD