AES256 encode+decode
a few minutes after posting I see the problem.
#define HEXCHAR_TO_DECCHAR(h) (h<=57 ? (h-48) : (h-55)) void HexToArray(string str, uchar &arr[]) { uchar tc[]; StringToCharArray(str, tc, 0, StringLen(str)); int i=0, j=0; for(i=0; i<StringLen(str); i+=2) { uchar tmpchr=(HEXCHAR_TO_DECCHAR(tc[i])<<4)+HEXCHAR_TO_DECCHAR(tc[i+1]); arr[j]=tmpchr; j++; } }
Mods, feel free to delete this thread. I found my answer, thanks to me :)
but maybe someone could benefit from it.
To title the process better :
Decrypting a NULL terminated string (retrieved from input), which is actually a Hex representation of an uchar array (encrypted data)
LoL
a few minutes after posting I see the problem.
Mods, feel free to delete this thread. I found my answer, thanks to me :)
but maybe someone could benefit from it.
To title the process better :
Decrypting a NULL terminated string (retrieved from input), which is actually a Hex representation of an uchar array (encrypted data)
Hi all,
this is the procedure I'm trying to accomplish :
then
but my code fails to regenerate the initial string. strangely enough it regenerates the RAW_string with some gibberish data attached to its end.