Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Encrypt/Decrypt QImages

Encrypt/Decrypt QImages

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 373 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tpap
    wrote on last edited by
    #1

    Hello,

    I am wondering if there is a straight forward way to encrypt-decrypt QImage (read from a .jpg file for example). I am aware of CryptoCpp and CryptFileDevice but as I see they only support plain files. The only solution is to save/read images as files (i.e. text files)?

    *I am not very familiar with cryptography concepts so please bear with me.

    JonBJ 1 Reply Last reply
    0
    • T tpap

      Hello,

      I am wondering if there is a straight forward way to encrypt-decrypt QImage (read from a .jpg file for example). I am aware of CryptoCpp and CryptFileDevice but as I see they only support plain files. The only solution is to save/read images as files (i.e. text files)?

      *I am not very familiar with cryptography concepts so please bear with me.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @tpap

      • CryptoCpp may well contain code which works on in-memory data rather than file, I don't know.

      • CryptFileDevice is open source code so you could always rip out the in-memory encryption code if you don't want a file involved.

      • Something like https://doc.qt.io/qt-5/qcryptographichash.html is a Qt class for encrypting. It works (in-memory) against any QByteArray/data, so any arbitrary bytes. You can treat a QImage as arbitrary bytes. But this does not allow you to decrypt, so probably not what you are looking for!

      • https://wiki.qt.io/Simple_encryption_with_SimpleCrypt does Qt encrypt & decrypt, but does not claim to be "secure".

      Other people may be able to recommend a "standard-ish" C++ library you might want to use.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved