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/Decryption Routines AES

Encryption/Decryption Routines AES

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++comsecurityquestion
1 Posts 1 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.
  • P Offline
    P Offline
    Paolo Ponzano
    wrote on last edited by
    #1

    Hello to everybody, I tried to use the implementation of George Anescu[^] for encoding some text but I'm not sure I encrpyt correctly the data..... datas are taken from a buffer and are in plaintext, I allocate a buffer using char *buffer_in=(char*)calloc(strlen(mainbuffer)+1,sizeof(char)); char *buffer_out=(char*)calloc(strlen(mainbuffer)+1,sizeof(char)); and the encrpyt it using oRijndael.MakeKey(key, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",16,16); oRijndael.Encrypt(buffer_in, *buffer_out, lenght,2); //2 = CFB where lenght is strlen(mainbuffer)+1; when I've executed oRijndael.Encrypt(....) I've got into buffer_out the data encrypted, but using strlen I get a lenght < of buffer_in, should I use _msize? the problem is that using oRijndael.Decrypt I've a lenght that's not the one of buffer_in,so Decrypt fails... Hope someone has used this implementation of AES and can help me, thanks Paolo

    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