Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Encryption

Encryption

Scheduled Pinned Locked Moved C / C++ / MFC
securityjsonperformancequestion
4 Posts 4 Posters 0 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    sschilachi
    wrote on last edited by
    #1

    I would like to encyrpt the contents of my program before I write them to a file. How do I go about encypting the data before I write it to a file, (at the minute I am using serialization). One limitation is that I don't want to serialize the data to a temporary file and then encrypt the file as if the unencrypted file still exists then the data is not secure. Could someone please just get me started, as I am not sure where to look as many encryption tutorials on this site encrypt and decrypt a file that already exists, I want to encrypt data in memory and write it to a file encrypted, then read the encrypted data back into the program's memory. Thanks a lot

    P R H 3 Replies Last reply
    0
    • S sschilachi

      I would like to encyrpt the contents of my program before I write them to a file. How do I go about encypting the data before I write it to a file, (at the minute I am using serialization). One limitation is that I don't want to serialize the data to a temporary file and then encrypt the file as if the unencrypted file still exists then the data is not secure. Could someone please just get me started, as I am not sure where to look as many encryption tutorials on this site encrypt and decrypt a file that already exists, I want to encrypt data in memory and write it to a file encrypted, then read the encrypted data back into the program's memory. Thanks a lot

      P Offline
      P Offline
      palbano
      wrote on last edited by
      #2

      >> then the data is not secure. secure from what? Depending on the definition of "secure" it can be almost impossible to accomplish. >> many encryption tutorials on this site encrypt and decrypt a >> file that already exists Ok but at least one of them encrypts the data in memory and then writes it to the file. So that would show you how to do it yes?

      "No matter where you go, there your are." - Buckaroo Banzai

      -pete

      1 Reply Last reply
      0
      • S sschilachi

        I would like to encyrpt the contents of my program before I write them to a file. How do I go about encypting the data before I write it to a file, (at the minute I am using serialization). One limitation is that I don't want to serialize the data to a temporary file and then encrypt the file as if the unencrypted file still exists then the data is not secure. Could someone please just get me started, as I am not sure where to look as many encryption tutorials on this site encrypt and decrypt a file that already exists, I want to encrypt data in memory and write it to a file encrypted, then read the encrypted data back into the program's memory. Thanks a lot

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        If it's sufficient to just encrypt plain text data, you could encrypt your CStrings before writing them out and after reading them in. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

        1 Reply Last reply
        0
        • S sschilachi

          I would like to encyrpt the contents of my program before I write them to a file. How do I go about encypting the data before I write it to a file, (at the minute I am using serialization). One limitation is that I don't want to serialize the data to a temporary file and then encrypt the file as if the unencrypted file still exists then the data is not secure. Could someone please just get me started, as I am not sure where to look as many encryption tutorials on this site encrypt and decrypt a file that already exists, I want to encrypt data in memory and write it to a file encrypted, then read the encrypted data back into the program's memory. Thanks a lot

          H Offline
          H Offline
          Henry miller
          wrote on last edited by
          #4

          Start by reading Applied Cryptography. Otherwise you will miss something subtile about encryption and get no benifit.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups