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. CryptoAPI Help

CryptoAPI Help

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++algorithmssecurityhelp
5 Posts 2 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.
  • G Offline
    G Offline
    ganesh_IT
    wrote on last edited by
    #1

    Hi guys, i am new to cryptoAPI. I have used public/private keys algorithm in .NET. But in MFC i need to do the same thing, i need to generate public and private keys and store them in files. In cryptoAPI all function uses the handle to keys that's why i am confused how to generate keys, store in files, and how to use them for encryption and decryption. some one tell me how can i achieve this... Thanks in advance ganesh_IT

    N 1 Reply Last reply
    0
    • G ganesh_IT

      Hi guys, i am new to cryptoAPI. I have used public/private keys algorithm in .NET. But in MFC i need to do the same thing, i need to generate public and private keys and store them in files. In cryptoAPI all function uses the handle to keys that's why i am confused how to generate keys, store in files, and how to use them for encryption and decryption. some one tell me how can i achieve this... Thanks in advance ganesh_IT

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      Here[^] is a list of resources / samples to check. Read about CryptGenKey API[^].

      home

      G 1 Reply Last reply
      0
      • N Niklas L

        Here[^] is a list of resources / samples to check. Read about CryptGenKey API[^].

        home

        G Offline
        G Offline
        ganesh_IT
        wrote on last edited by
        #3

        Hi Niklas, thanks for your help. In my project i need to encrypt my client's publickey and transfer it to server. Server decrypt it and match the client's publickey with server's publickey. But cryptoAPI function uses handle for keys, i don't know how to write public/privatekey in files because in need to transfer keys between client and server. Thanks in advance ganesh_IT

        N 1 Reply Last reply
        0
        • G ganesh_IT

          Hi Niklas, thanks for your help. In my project i need to encrypt my client's publickey and transfer it to server. Server decrypt it and match the client's publickey with server's publickey. But cryptoAPI function uses handle for keys, i don't know how to write public/privatekey in files because in need to transfer keys between client and server. Thanks in advance ganesh_IT

          N Offline
          N Offline
          Niklas L
          wrote on last edited by
          #4

          You can use CryptExportKey[^] and CryptImportKey[^].

          home

          G 1 Reply Last reply
          0
          • N Niklas L

            You can use CryptExportKey[^] and CryptImportKey[^].

            home

            G Offline
            G Offline
            ganesh_IT
            wrote on last edited by
            #5

            Thanks for your help. CryptoAPI is complicated to understand.

            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