samedi 18 avril 2015

Convert text in hex form to characters in C

I am trying to decrypt a cipher text in C. The cipher text appeared to be in form of symbols and unreadable characters and I was unable to read the cipher text stored in this from a file properly hence the decryption was failing. So I tried a different method where I stored the cipher text in form of hexadecimal by doing:



sprintf(file,"%02x",ciphertxt(//symbols));


Now I am able to read the comple te cipher text in hexadecimal form. But in order to decrypt it I need to pass it to openssl decryption function in its pure symbolic form only. How can I change back the hexadecimal form to the original symbolic character form?


Aucun commentaire:

Enregistrer un commentaire