Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Simple Encryption/Decryption in QWebView

Simple Encryption/Decryption in QWebView

Scheduled Pinned Locked Moved Qt WebKit
5 Posts 3 Posters 2.8k 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.
  • E Offline
    E Offline
    exzibit7
    wrote on last edited by
    #1

    I'm making a browser using QWebView and I want to achieve the following things:

    Browser----->sends request to server----->server responds with simple encrypted data----->browser decrypts & tampers with the data and shows it.

    I want this encryption for each and every request made by the browser, even for the images.

    But the problem is I cannot figure out how to decrypt the received data before viewing it.
    I haven't found any signals or virtual functions that I could override.

    I even tried changing the QNetworkAccessManager and then tried tampering with the QNetworkReply, but the QNetworkReply is readonly.

    So has anyone got a solution to this?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      Have you tried to send a request, fetch the response from the network, decrypt it to an html file stored locally and then to load the local web page?

      http://anavi.org/

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Is there any reason you're not using SSL? I mean: it does exactly what you describe already, an a transparent way.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          exzibit7
          wrote on last edited by
          #4

          Yes SSL is a solution. But enryption is not the only task I'm looking to achieve. I even want to tamper the received data(append, remove or completely change the data).

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            I think you best bet is to subclass [[doc:QNetworkAccessManager]] and [[doc:QNetworkReply]]. In your subclass of QNAM, you reimplement the createRequest method to return your own subclass of QNetworkReply. Your custom reply class can manipulate the data as it streams in or just when it is read out.

            1 Reply Last reply
            0

            • Login

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