I have a small problem when inserting the key in a c + + project in visual studio 2010 proffessional.
When I put the key only accepts the first two keys and this can be a problem when you put a similar key that begins with the first two characters.
However when I put the key directly in hexadecimal characters validates all.
I make it clear in advance know very little I am learning c + + This is what I have done for now.
//****************** AES decryption ********************
const int size = 32;
unsigned char aesKey[size];
char* p;
for (int i = 1; i < argc || i < size; ++i)
{
aesKey[i] = (unsigned char)strtol(argv[2], &p, 16);
}
unsigned char *buf;
aes256_context ctx;
aes256_init(&ctx, aesKey);
for (unsigned long i = 0; i < lSize/16; i++) {
buf = text + (i * 16);
aes256_decrypt_ecb(&ctx, buf);
}
aes256_done(&ctx);
//******************************************************
where I have the argument argv[2] is because that I have to use the argument 2
Any suggestions or ideas, thanks