AES Crypt for Linux - ARM CROSS COMPILE- ERROR

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
vidya
Posts: 1
Joined: Thu Jan 24, 2013 11:51 am

AES Crypt for Linux - ARM CROSS COMPILE- ERROR

Post by vidya »

Hi Sir,
I am working on the jpeg image encryption and decryption, cross compiled aes cry source code package for arm linux DM3730 processor. When run the binary on the board gives run time error "Error in iconv_open: Invalid argument" in encryption but when comment out the entire function of password.c
int passwd_to_utf16(unsigned char *in_passwd,
int length,
int max_length,
unsigned char *out_passwd)
{
unsigned char *ic_outbuf,
*ic_inbuf;
// iconv_t condesc;
size_t ic_inbytesleft,
ic_outbytesleft;

/* Max length is specified in character, but this function deals
* with bytes. So, multiply by two since we are going to create a
* UTF-16 string.
*/
max_length *= 2;

ic_inbuf = in_passwd;
ic_inbytesleft = length;
ic_outbytesleft = max_length;
ic_outbuf = out_passwd;

/* if ((condesc = iconv_open("UTF-16LE", nl_langinfo(CODESET))) ==
(iconv_t)(-1))
{
perror("Error in iconv_open");
return -1;
}

if (iconv(condesc,
(char **) &ic_inbuf,
&ic_inbytesleft,
(char **) &ic_outbuf,
&ic_outbytesleft) == -1)
{
switch (errno)
{
case E2BIG:
fprintf(stderr, "Error: password too long\n");
iconv_close(condesc);
return -1;
break;
default: */
//~ printf("EILSEQ(%d), EINVAL(%d), %d\n", EILSEQ, EINVAL, errno);
/* fprintf(stderr,
"Error: Invalid or incomplete multibyte sequence\n");
iconv_close(condesc);
return -1;
}
}*/
// iconv_close(condesc);
then cross compiled successfully, run the binary with command "./aescrypt -e image .jpeg" encrypting successfully and ./aescrypt -d image.jpeg.aes" decryption also happening successfully but when i open the image.jpeg then error comes like "could not load image.
what is the issue i am not able to figure out can you help me asap.

Thanks,
Vidya
dacker
Posts: 6
Joined: Thu Aug 30, 2012 10:43 pm

Re: AES Crypt for Linux - ARM CROSS COMPILE- ERROR

Post by dacker »

Did you find a solution?
Post Reply