I don't see your point. You can encrypt data regardless of the format it is in.
Qt Code:
  1. bool writeFile(QIODevice &device, const QSettings::SettingsMap &map) {
  2. QBuffer buffer;
  3. buffer.open(QIODevice::WriteOnly);
  4. QDataStream stream(&buffer);
  5. device << map;
  6. QByteArray encrypted = encrypt(buffer.data());
  7. device.write(encrypted);
  8. return true;
  9. }
To copy to clipboard, switch view to plain text mode